molforge / index.html
Adhitya122's picture
Upload folder using huggingface_hub
e99bda4 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MolForge: The Scientific Method as a Workflow</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
background-color: #ffffff;
color: #0f172a;
}
.prose-custom {
max-width: 70ch;
margin: 0 auto;
}
.shadcn-card {
border: 1px solid #e2e8f0;
background: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.shadcn-badge {
background: #f1f5f9;
color: #475569;
font-size: 0.75rem;
font-weight: 600;
padding: 0.125rem 0.625rem;
border-radius: 9999px;
display: inline-flex;
align-items: center;
}
.mono {
font-family: 'JetBrains Mono', monospace;
}
.video-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
border-radius: 0.75rem;
border: 1px solid #e2e8f0;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body class="bg-white">
<!-- Navigation -->
<nav class="border-b sticky top-0 bg-white/80 backdrop-blur-md z-50">
<div class="max-w-5xl mx-auto px-6 h-16 flex items-center justify-between">
<span class="font-bold tracking-tight text-lg">MolForge</span>
<div class="flex gap-6 text-sm font-medium text-slate-600">
<a href="https://github.com/Adhitya-Vardhan/molt_lab" target="_blank" rel="noopener noreferrer" class="hover:text-black transition-colors">GitHub</a>
<a href="https://huggingface.co/spaces/Adhitya122/molforge" class="hover:text-black transition-colors">Space</a>
<a href="https://colab.research.google.com/drive/1c6npGkGNbbbd8XFNeS6zInBpopLnJ4W4?usp=sharing" target="_blank" rel="noopener noreferrer" class="hover:text-black transition-colors font-bold text-indigo-600">Try Training</a>
</div>
</div>
</nav>
<main class="max-w-5xl mx-auto px-6 py-20">
<!-- Header -->
<div class="mb-16 text-center">
<div class="flex justify-center gap-2 mb-6">
<span class="shadcn-badge bg-indigo-50 text-indigo-700 border border-indigo-100">Hackathon Submission</span>
<span class="shadcn-badge">Medical Oncology</span>
</div>
<h1 class="text-4xl md:text-6xl font-extrabold tracking-tight mb-6 leading-tight max-w-3xl mx-auto">
MolForge: The Scientific Method as a Workflow
</h1>
<p class="text-xl text-slate-500 mb-10 leading-relaxed max-w-2xl mx-auto">
How we trained an LLM to navigate a resource-constrained laboratory, optimize oncology drug candidates, and survive scientific "sunk-cost" traps.
</p>
<div class="flex items-center justify-center gap-4 text-sm text-slate-400 mb-12">
<div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 font-bold">AV</div>
<div class="text-left">
<p class="font-semibold text-slate-900 leading-none mb-1">Adhitya Vardhan</p>
<p class="leading-none">OpenEnv Hackathon 2026 • 12 min read</p>
</div>
</div>
<!-- Video Section -->
<div class="max-w-3xl mx-auto mb-20">
<div class="video-container shadow-2xl">
<iframe src="https://www.youtube.com/embed/q8YoA0YhIn8" title="MolForge Explainer Video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<p class="mt-4 text-sm text-slate-400 italic">Watch the MolForge technical explainer (3:24)</p>
</div>
</div>
<!-- Introduction -->
<div class="prose prose-slate prose-lg max-w-none mb-24 leading-relaxed text-slate-700 border-b pb-20">
<h2 class="text-3xl font-bold text-slate-900 mb-6">Introduction</h2>
<p>
In traditional drug discovery tasks, LLMs are often asked to "generate a molecule" in a single shot. But science doesn't happen in a vacuum. It happens in the loop—through trial, error, and verification.
</p>
<p class="mt-4">
<strong>MolForge</strong> is a reinforcement learning environment that simulates a medical oncology discovery lab. It forces the model to navigate real-world constraints: limited budget, molecular toxicity, and synthesis complexity.
</p>
<div class="mt-12 p-8 bg-slate-900 text-slate-200 rounded-2xl shadow-lg">
<p class="text-indigo-400 font-bold mb-4 uppercase tracking-widest text-xs">Core Philosophy</p>
<p class="text-2xl font-medium leading-tight">
"The model is a trainable research agent inside a controlled scientific environment, not an oracle. It is judged by chemistry and biomedical verifiers, corrected by specialist feedback, and scored by a reward system that explains exactly where the path to a discovery failed."
</p>
</div>
</div>
<!-- The Scientific Verifier Stack -->
<section class="mb-32">
<div class="flex items-center gap-3 mb-8">
<div class="w-10 h-10 rounded-lg bg-emerald-600 flex items-center justify-center text-white font-bold">🧪</div>
<h2 class="text-3xl font-bold tracking-tight">The Scientific Verifier Stack</h2>
</div>
<p class="text-slate-600 mb-10 text-lg leading-relaxed">
MolForge doesn't just predict outcomes; it utilizes multiple simulation layers to ground the model's decisions in chemical and biological reality.
</p>
<div class="grid md:grid-cols-3 gap-6 mb-12">
<div class="shadcn-card p-8 bg-white hover:border-emerald-500 transition-all cursor-default group">
<div class="w-12 h-12 bg-emerald-50 text-emerald-600 rounded-xl flex items-center justify-center mb-6 text-xl">🧬</div>
<h4 class="font-bold text-lg mb-3">RDKit</h4>
<p class="text-sm text-slate-500 leading-relaxed italic">"Keeping molecules physically possible"</p>
<p class="text-sm text-slate-600 mt-4 leading-relaxed mb-6">
RDKit acts as the fundamental chemistry ruleset. It checks for molecular valency, ensures every edit is chemically plausible, and calculates core descriptors like Lipophilicity and TPSA.
</p>
<a href="https://www.rdkit.org" target="_blank" class="text-xs font-bold text-emerald-600 uppercase tracking-widest hover:underline">Visit RDKit.org →</a>
</div>
<div class="shadcn-card p-8 bg-white hover:border-blue-500 transition-all cursor-default group">
<div class="w-12 h-12 bg-blue-50 text-blue-600 rounded-xl flex items-center justify-center mb-6 text-xl">💊</div>
<h4 class="font-bold text-lg mb-3">TDC Oracles</h4>
<p class="text-sm text-slate-500 leading-relaxed italic">"Predicting biomedical fate"</p>
<p class="text-sm text-slate-600 mt-4 leading-relaxed mb-6">
Utilizing the Therapeutics Data Commons, MolForge predicts real-world ADMET properties, toxicity risks, and synthesizability scores (SA_Score) for every candidate.
</p>
<a href="https://tdcommons.ai" target="_blank" class="text-xs font-bold text-blue-600 uppercase tracking-widest hover:underline">Explore TDCommons.ai →</a>
</div>
<div class="shadcn-card p-8 bg-white hover:border-indigo-500 transition-all cursor-default">
<div class="w-12 h-12 bg-indigo-50 text-indigo-600 rounded-xl flex items-center justify-center mb-6 text-xl">🎯</div>
<h4 class="font-bold text-lg mb-3">Heuristic Docking</h4>
<p class="text-sm text-slate-500 leading-relaxed italic">"Simulating receptor-drug fit"</p>
<p class="text-sm text-slate-600 mt-4 leading-relaxed">
A fast, physics-inspired simulation that updates potency in milliseconds based on structural pocket matching and receptor complementarity.
</p>
</div>
</div>
<div class="p-8 bg-slate-50 border border-slate-200 rounded-2xl">
<h5 class="font-bold text-slate-900 mb-6 flex items-center gap-2">
<span class="w-2 h-2 bg-indigo-500 rounded-full"></span>
The 3 Rules of Potency Simulation
</h5>
<div class="grid md:grid-cols-3 gap-8">
<div class="space-y-2">
<p class="font-bold text-sm text-slate-800">1. Pocket Matching</p>
<p class="text-xs text-slate-500 leading-relaxed">Structural fit of the fragment (e.g., azaindole) into the KRAS G12C target pocket.</p>
</div>
<div class="space-y-2">
<p class="font-bold text-sm text-slate-800">2. Lipophilic Match</p>
<p class="text-xs text-slate-500 leading-relaxed">Targeting the ideal LogP of <strong>3.0</strong> for optimal binding without repulsive clashes.</p>
</div>
<div class="space-y-2">
<p class="font-bold text-sm text-slate-800">3. Polarity Match</p>
<p class="text-xs text-slate-500 leading-relaxed">Optimizing TPSA toward the ideal <strong>85.0</strong> to avoid polar clashes in hydrophobic pockets.</p>
</div>
</div>
</div>
</section>
<!-- The POMDP Architecture -->
<section class="mb-32">
<div class="flex items-center gap-3 mb-8">
<div class="w-10 h-10 rounded-lg bg-indigo-600 flex items-center justify-center text-white font-bold">1</div>
<h2 class="text-3xl font-bold tracking-tight">The POMDP Architecture</h2>
</div>
<p class="text-slate-600 mb-10 text-lg leading-relaxed">
MolForge is built as a <strong>Partially Observable Markov Decision Process (POMDP)</strong>. This means the agent never sees the "hidden truth" of the receptor. It only sees what its budget allows it to assay.
</p>
<div class="shadcn-card p-4 bg-slate-50 mb-12 border-dashed">
<img src="assets/molforge_architecture.png" alt="Architecture" class="rounded-lg w-full">
<p class="mt-4 text-center text-xs text-slate-400 font-medium tracking-wide">THE SCIENTIFIC FEEDBACK LOOP: VERIFIER-FIRST DESIGN</p>
</div>
<div class="grid md:grid-cols-2 gap-8">
<div class="space-y-4">
<h4 class="font-bold text-slate-900 border-b pb-2">The Hidden State</h4>
<ul class="space-y-3 text-slate-600 text-sm">
<li class="flex gap-2"><span></span> <strong>Ground Truth Potency:</strong> The exact hidden binding energy of the KRAS G12C pocket.</li>
<li class="flex gap-2"><span></span> <strong>Sunk-Cost Traps:</strong> Starting scaffolds that look promising but have hidden liabilities.</li>
<li class="flex gap-2"><span></span> <strong>Target Mutation:</strong> Late-stage shifts in the pocket (Level 2) that punish blind optimization.</li>
</ul>
</div>
<div class="space-y-4">
<h4 class="font-bold text-indigo-600 border-b pb-2">The Visible Evidence</h4>
<ul class="space-y-3 text-slate-600 text-sm">
<li class="flex gap-2"><span></span> <strong>RDKit & TDC Signals:</strong> Noisy, verifier-backed readings of Lipophilicity (LogP) and TPSA.</li>
<li class="flex gap-2"><span></span> <strong>Heuristic Docking:</strong> Fast simulations of pocket matching and receptor fit.</li>
<li class="flex gap-2"><span></span> <strong>Governance Vetoes:</strong> Objections from the Safety Specialist or Process Chemist.</li>
</ul>
</div>
</div>
</section>
<!-- Search Space & Scenarios -->
<section class="mb-32">
<div class="flex items-center gap-3 mb-8">
<div class="w-10 h-10 rounded-lg bg-indigo-600 flex items-center justify-center text-white font-bold">2</div>
<h2 class="text-3xl font-bold tracking-tight">The Molecular Search Space</h2>
</div>
<p class="text-slate-600 mb-10 text-lg leading-relaxed">
We don't ask the model to memorize molecules. We ask it to navigate a <strong>combinatorial space of 256 fragments</strong> across three starting scenarios.
</p>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-12">
<div class="shadcn-card p-4 text-center">
<p class="text-xs font-bold text-slate-400 uppercase mb-2">Warhead</p>
<p class="text-sm font-semibold">4 Options</p>
</div>
<div class="shadcn-card p-4 text-center">
<p class="text-xs font-bold text-slate-400 uppercase mb-2">Hinge</p>
<p class="text-sm font-semibold">4 Options</p>
</div>
<div class="shadcn-card p-4 text-center">
<p class="text-xs font-bold text-slate-400 uppercase mb-2">Solvent Tail</p>
<p class="text-sm font-semibold">4 Options</p>
</div>
<div class="shadcn-card p-4 text-center">
<p class="text-xs font-bold text-slate-400 uppercase mb-2">Back Pocket</p>
<p class="text-sm font-semibold">4 Options</p>
</div>
</div>
<h3 class="text-xl font-bold mb-6">Benchmark Scenarios</h3>
<div class="shadcn-card overflow-hidden mb-12">
<table class="w-full text-left text-sm">
<thead class="bg-slate-50 border-b">
<tr>
<th class="px-6 py-4 font-semibold text-slate-900">Scenario</th>
<th class="px-6 py-4 font-semibold text-slate-900">Story</th>
<th class="px-6 py-4 font-semibold text-slate-900">Budget</th>
<th class="px-6 py-4 font-semibold text-slate-900">Difficulty</th>
</tr>
</thead>
<tbody class="divide-y">
<tr>
<td class="px-6 py-4 font-bold text-indigo-600">Level 0: Easy</td>
<td class="px-6 py-4 text-slate-500">Near-viable scaffold needs safety repair and evidence.</td>
<td class="px-6 py-4">3600</td>
<td class="px-6 py-4"><span class="shadcn-badge bg-emerald-50 text-emerald-700">Low</span></td>
</tr>
<tr>
<td class="px-6 py-4 font-bold text-indigo-600">Level 1: Medium</td>
<td class="px-6 py-4 text-slate-500">Potency, toxicity, and synthesis must be balanced.</td>
<td class="px-6 py-4">4300</td>
<td class="px-6 py-4"><span class="shadcn-badge bg-orange-50 text-orange-700">Moderate</span></td>
</tr>
<tr>
<td class="px-6 py-4 font-bold text-indigo-600">Level 2: Hard</td>
<td class="px-6 py-4 text-slate-500">Sunk-cost trap: starting series has hidden liability.</td>
<td class="px-6 py-4">5200</td>
<td class="px-6 py-4"><span class="shadcn-badge bg-red-50 text-red-700">Critical</span></td>
</tr>
</tbody>
</table>
</div>
</section>
<!-- Reward Design -->
<section class="mb-32">
<div class="flex items-center gap-3 mb-8">
<div class="w-10 h-10 rounded-lg bg-indigo-600 flex items-center justify-center text-white font-bold">3</div>
<h2 class="text-3xl font-bold tracking-tight">Reward Design: Beyond Scalar Scores</h2>
</div>
<p class="text-slate-600 mb-10 text-lg leading-relaxed">
Training for scientific rigor requires more than a "Good/Bad" signal. We use a <strong>decomposed reward system</strong> that mixes coarse shaping with sparse terminal bonuses.
</p>
<div class="grid md:grid-cols-3 gap-6 mb-12">
<div class="shadcn-card p-6 bg-slate-50 border-t-4 border-t-indigo-500">
<h4 class="font-bold mb-2 text-sm uppercase tracking-wider text-slate-500">Coarse Shaping</h4>
<p class="text-xs text-slate-500">Edit feedback avoids exact hidden deltas, forcing the model to rely on empirical assays.</p>
</div>
<div class="shadcn-card p-6 bg-slate-50 border-t-4 border-t-emerald-500">
<h4 class="font-bold mb-2 text-sm uppercase tracking-wider text-slate-500">Evidence Multipliers</h4>
<p class="text-xs text-slate-500">Submissions without current potency, toxicity, and synthesis support receive massive penalties.</p>
</div>
<div class="shadcn-card p-6 bg-slate-50 border-t-4 border-t-orange-500">
<h4 class="font-bold mb-2 text-sm uppercase tracking-wider text-slate-500">Budget Efficiency</h4>
<p class="text-xs text-slate-500">Small credits for valid evidence-backed submissions that use less than the allocated budget.</p>
</div>
</div>
<div class="p-6 bg-indigo-50 border border-indigo-100 rounded-xl text-sm">
<p class="font-bold text-indigo-700 mb-2 italic">"Curriculum mode is the RL warm-up engine—providing the breadcrumbs needed for the model to discover the submission bonus."</p>
</div>
</section>
<!-- Results -->
<section class="mb-32">
<div class="flex items-center gap-3 mb-8">
<div class="w-10 h-10 rounded-lg bg-indigo-600 flex items-center justify-center text-white font-bold">4</div>
<h2 class="text-3xl font-bold tracking-tight">Training Results</h2>
</div>
<div class="shadcn-card overflow-hidden mb-12">
<table class="w-full text-left text-sm">
<thead class="bg-slate-900 text-white">
<tr>
<th class="px-6 py-4 font-semibold uppercase tracking-wider text-[10px]">Difficulty</th>
<th class="px-6 py-4 font-semibold uppercase tracking-wider text-[10px]">Before (SFT)</th>
<th class="px-6 py-4 font-semibold uppercase tracking-wider text-[10px]">After (RL)</th>
<th class="px-6 py-4 font-semibold uppercase tracking-wider text-[10px]">Improvement</th>
</tr>
</thead>
<tbody class="divide-y">
<tr>
<td class="px-6 py-5 font-bold">Level 0: Easy</td>
<td class="px-6 py-5 text-slate-400">0.1167</td>
<td class="px-6 py-5 font-extrabold text-slate-900">0.1295</td>
<td class="px-6 py-5 text-emerald-600 font-black">+10.9%</td>
</tr>
<tr>
<td class="px-6 py-5 font-bold">Level 1: Medium</td>
<td class="px-6 py-5 text-slate-400">0.1167</td>
<td class="px-6 py-5 font-extrabold text-slate-900">0.1278</td>
<td class="px-6 py-5 text-emerald-600 font-black">+9.5%</td>
</tr>
<tr>
<td class="px-6 py-5 font-bold">Level 2: Hard</td>
<td class="px-6 py-5 text-slate-400">0.0800</td>
<td class="px-6 py-5 font-extrabold text-slate-900">0.0866</td>
<td class="px-6 py-5 text-emerald-600 font-black">+8.3%</td>
</tr>
</tbody>
</table>
</div>
<div class="grid md:grid-cols-2 gap-8">
<div class="shadcn-card p-6">
<img src="assets/reward_curve.png" alt="Reward Curve" class="rounded border mb-4">
<p class="text-xs font-bold text-slate-400 uppercase tracking-widest text-center">RL Training Progression</p>
</div>
<div class="shadcn-card p-6">
<img src="assets/Logs.png" alt="Logs" class="rounded border mb-4">
<p class="text-xs font-bold text-slate-400 uppercase tracking-widest text-center">Governance Action History</p>
</div>
</div>
</section>
<!-- Final Takeaway -->
<section class="mb-32 pt-20 border-t text-center">
<h2 class="text-4xl font-black mb-6 tracking-tight">Final Takeaway</h2>
<p class="text-slate-500 max-w-2xl mx-auto mb-12 text-lg leading-relaxed text-justify">
MolForge proves that scientific AI should not be built as a single-shot generator. By grounding the LLM in a <strong>closed-loop scientific environment</strong>, we can train models that respect budget, coordinate with specialists, and base their discoveries on verifiable evidence.
</p>
<div class="flex flex-wrap justify-center gap-4">
<a href="https://github.com/Adhitya-Vardhan/molt_lab" target="_blank" rel="noopener noreferrer" class="px-10 py-4 bg-slate-900 text-white font-bold rounded-xl hover:bg-slate-800 transition-all shadow-xl hover:-translate-y-1">Explore Code</a>
<a href="https://colab.research.google.com/drive/1c6npGkGNbbbd8XFNeS6zInBpopLnJ4W4?usp=sharing" target="_blank" rel="noopener noreferrer" class="px-10 py-4 bg-white border-2 border-slate-900 text-slate-900 font-bold rounded-xl hover:bg-slate-50 transition-all hover:-translate-y-1">Run Notebook</a>
</div>
<div class="mt-16 flex justify-center gap-8 text-sm font-bold text-slate-400">
<a href="https://huggingface.co/spaces/Adhitya122/molforge" class="hover:text-indigo-600 transition-colors uppercase tracking-widest">Space Deployment</a>
<a href="https://huggingface.co/Adhitya122/molforge-grpo-oncology" target="_blank" rel="noopener noreferrer" class="hover:text-indigo-600 transition-colors uppercase tracking-widest">Model Card</a>
</div>
</section>
<!-- Footer -->
<footer class="py-12 border-t text-xs text-slate-400 text-center">
<p>© 2026 MolForge Project • Built for the OpenEnv Hackathon</p>
</footer>
</main>
</body>
</html>