Front Matter
5 entries- F1Why This Book ExistsDiscovery as the common thread across software engineering, scientific research, and autonomous AI.
- F2What This Book CoversThe seven-part arc: foundations, vibe coding, data and models, knowledge, simulation, domains, and autonomous systems.
- F3Who Should Read This BookThree personas: the software engineer building research tools, the scientist or researcher who wants rigorous theory and working code, and the domain expert adding AI to a scientific workflow.
- F4About the AuthorsAlexander (Sasha) Apartsin, Ph.D. and Yehudit Aperstein, Ph.D.
- F5About the Hands-On AI Science SeriesSeven deep, build-it-yourself guides to the major fields of artificial intelligence.
Part I · Foundations of Discovery AI
6 chaptersDiscovery as search, inference, optimization, and experimentation. The scientific, mathematical, and architectural foundations all later chapters build on.
-
1Discovery as Search State spaces, action spaces, heuristics, information gain, exploration versus exploitation, and the unified view of discovery as search through hypothesis space.
-
2Scientific Discovery and Knowledge Creation The philosophy and practice of scientific method: hypothesis generation, experiment design, falsification, paradigm shifts, and the computational analogy.
-
3Knowledge Representation Ontologies, knowledge graphs, semantic embeddings, property graphs, and the formal structures that let AI systems reason over scientific knowledge.
-
4Reasoning for Discovery Deductive, inductive, and abductive reasoning; probabilistic and causal inference; chain-of-thought as computational reasoning; formal verification.
-
5Discovery Through Data, Models, and Simulation Data-driven discovery, model-based discovery, and simulation-based inference as three complementary discovery paradigms.
-
6Discovery System Architecture The Discovery Workbench: components, data flows, artifact stores, agent loops, evaluation harnesses, and the architecture that carries the entire book.
Part II · Discovery Through Software Engineering and Vibe Coding
18 chaptersVibe coding as a rigorous discipline: specification, steering, verification, and repair. From a first coding agent to fully autonomous software organizations.
-
7Software Development as a Discovery Process Requirements, architecture, and algorithms as a search problem. The parallel between scientific discovery and software engineering.
-
8Foundations of AI-Assisted Software Engineering Code LLMs, code completion, code search, and the modern AI coding stack. Models: Codex, Claude, Gemini, GPT-4o, Qwen2.5-Coder.
-
9Vibe Coding as Specification, Steering, Verification, and Repair The four-step vibe coding loop. Writing effective specifications, steering toward correctness, verifying outputs, and repairing failures. Not a shortcut: a discipline.
-
10Prompting to Programming Prompt engineering for code generation: chain-of-thought, few-shot examples, structured outputs, tool use, and the systematic approach to getting code you can trust.
-
11Context Engineering at Repository Scale Building and managing context windows for large codebases: retrieval, indexing, summarization, and the art of giving an AI agent exactly the context it needs.
-
12Building MCP Servers for Scientific Workflows The Model Context Protocol standard. Building MCP servers that expose scientific databases, instruments, and compute resources to AI agents.
-
13Discovery of Requirements AI-assisted requirements elicitation, specification synthesis, and formal verification of requirements. From ambiguous goals to testable acceptance criteria.
-
14Discovery of Architectures Neural architecture search, program synthesis, and AI-guided system design. Searching the space of architectures with reinforcement learning and evolutionary methods.
-
15Discovery of Algorithms AI-assisted algorithm design: FunSearch, AlphaDev, program synthesis for combinatorial problems, and the emerging field of AI-discovered algorithms.
-
16AI-Assisted Implementation at Repository Scale Agentic coding across large repositories: navigating, editing, refactoring, and maintaining codebases with AI agents. SWE-bench Verified as the evaluation standard.
-
17Multi-Agent Software Teams Orchestrating multiple specialized agents: planner, coder, reviewer, tester, and deployer. Communication protocols, shared memory, conflict resolution, and team evaluation.
-
18AI-Assisted Testing and QA Generating tests, fuzzing, property-based testing, mutation testing, and AI-driven coverage analysis. Building test suites alongside AI-generated code.
-
19AI-Assisted Debugging Root cause analysis, fault localization, trace analysis, and automated repair. Teaching agents to diagnose errors systematically rather than guess-and-check.
-
20AI for Software Security Vulnerability detection, secure code generation, formal verification, and adversarial robustness. AI as both attacker and defender in software security.
-
21AI for DevOps and Platform Engineering AI-assisted CI/CD, infrastructure-as-code generation, incident response, log analysis, and the intelligent platform engineering stack.
-
22MLOps, LLMOps, and AgentOps Model registries, experiment tracking, deployment pipelines, prompt versioning, agent observability, and the full operations stack for AI-powered research systems.
-
23Evaluating AI Coding Agents Benchmarks: SWE-bench Verified, HumanEval, MBPP, DS-1000, BigCodeBench. Designing rigorous evaluations that predict real-world coding agent performance.
-
24Autonomous Software Organizations The trajectory from tool to team: coding agents managing their own roadmaps, issue trackers, and deployment pipelines. Governance, oversight, and the human-in-the-loop.
Part III · Discovery Through Data and Models
11 chaptersScientific foundation models, multimodal AI, reasoning models, and generative models for molecular design. The machine learning toolkit of the AI scientist.
-
25Exploratory Discovery Dimensionality reduction, clustering, anomaly detection, and exploratory data analysis as discovery tools. Finding structure before you know what structure to look for.
-
26Representation Learning Self-supervised and contrastive learning for scientific data. Learning representations for molecules, proteins, genomic sequences, and scientific text that transfer across tasks.
-
27Scientific Foundation Models ESM-3 for proteins, AlphaFold3 (2024 Nobel Prize context), GNoME for materials, Uni-Mol2 for molecules, Evo2 for DNA. Architecture, training, fine-tuning, and benchmarks.
-
28Multimodal Scientific AI Bridging modalities: text, molecular structure, protein sequence, spectral data, microscopy images, and scientific figures. Vision-language models for scientific reasoning.
-
29Reasoning Models for Discovery o1/o3, Gemini Deep Think, AlphaProof, AlphaGeometry 2, DeepSeek-R1. Chain-of-thought, process reward models, and formal reasoning with Lean4 and mathlib4.
-
30Anomaly and Novelty Discovery Statistical and neural anomaly detection, novelty scoring, out-of-distribution detection, and using anomaly signals as discovery triggers in scientific data streams.
-
31Causal Discovery and Causal Inference Structure learning, do-calculus, instrumental variables, and difference-in-differences. Building causal graphs from observational scientific data.
-
32Bayesian Discovery and Uncertainty Bayesian inference, MCMC, variational inference, Gaussian processes, and calibrated uncertainty. Making discovery claims that quantify what we do not know.
-
33Scientific Machine Learning Physics-informed neural networks, neural ODEs, operator learning, and hybrid physics-ML models. When physical law is prior knowledge, not a constraint to ignore.
-
34Generative Models for Discovery Diffusion models (EDM, DiffSBDD, DiffDock-L, RFDiffusion2), flow matching (FoldFlow2, Boltz-1, Chai-1), and equivariant SE(3) architectures for molecular, protein, and material generation.
-
35Symbolic Regression and Equation Discovery Discovering mathematical laws from data. Genetic programming, neural symbolic regression, PySR, AI Feynman, and the frontier of AI-discovered equations.
Part IV · Discovery Through Knowledge
6 chaptersLiterature at scale, retrieval-augmented discovery, knowledge graphs, hypothesis generation, and research agents. The full knowledge infrastructure for AI-assisted science.
-
36Literature Mining Named entity recognition, relation extraction, claim extraction, citation network analysis, and systematic review automation across millions of papers with PaperQA2 and similar systems.
-
37Retrieval-Augmented Discovery Systems RAG architectures for scientific corpora: dense retrieval, hybrid search, evidence grounding, hallucination detection, and citation-backed claim generation.
-
38Knowledge Graph Discovery Building, populating, and querying scientific knowledge graphs. Link prediction, entity alignment, reasoning over incomplete graphs, and the Unified Medical Language System as a case study.
-
39Hypothesis Generation Computational creativity and abductive reasoning for science. Generating, ranking, and filtering novel hypotheses with LLMs, knowledge graphs, and structured search over idea space.
-
40Research Agents ChemCrow, Atlas/ChemOS 2.0, and research agent architectures. Tool use, memory, planning, and the agent loop for scientific research. ScienceAgentBench (NeurIPS 2024) as the evaluation framework.
-
41Scientific Claim Validation Automated fact-checking, evidence aggregation, replication checking, and statistical validity assessment. Building pipelines that distinguish strong from weak scientific claims.
Part V · Discovery Through Simulation and Optimization
6 chaptersDifferentiable programming, scientific simulation, world models, Bayesian optimization, automated experiment design, and provenance. The computational machinery of discovery.
-
42Differentiable Programming for Discovery JAX, Equinox, diffrax, and JAX-MD. Automatic differentiation through physical simulations, molecular dynamics, and scientific programs. Physics-informed discovery via gradient flow.
-
43Scientific Simulation Molecular dynamics, Monte Carlo methods, finite element methods, and agent-based models as discovery tools. When and how to replace physical experiments with computational ones.
-
44World Models for Discovery Learning compressed models of physical and biological systems. Planning with world models, counterfactual reasoning, and using learned simulators to guide experiment selection.
-
45Optimization for Discovery Bayesian optimization, evolutionary strategies, and reinforcement learning for scientific design. Optimizing molecular properties, experimental conditions, and research strategies.
-
46Automated Experiment Design Active learning, optimal experimental design, and closed-loop experiment planning. Choosing the next experiment to run based on current knowledge and uncertainty.
-
47Experiment Registries and Scientific Provenance MLflow, Weights & Biases, and domain-specific registries. Tracking experiments, data lineage, model artifacts, and the full provenance chain for reproducible science.
Part VI · Discovery in Scientific Domains
5 chaptersDeep application chapters: the AI toolkit deployed in biology, chemistry, physics, climate science, and social systems. Domain models, benchmarks, and end-to-end recipes.
-
48Discovery AI for Biology and Medicine Drug discovery, genomics, single-cell analysis, clinical trial design, and AI-assisted diagnosis. AlphaFold3, ESM-3, and the 2024 Nobel Prize in Chemistry as the anchor case study.
-
49Discovery AI for Chemistry and Materials Molecular generation, retrosynthesis, reaction prediction, and materials design. GNoME, MatterGen, CDVAE, MACE-MP-0, and CHGNet for the materials discovery pipeline.
-
50Discovery AI for Physics and Engineering Symbolic regression for physical laws, surrogate models for simulations, neural solvers for PDEs, and AI in particle physics, astronomy, and structural engineering.
-
51Discovery AI for Climate and Earth Science Climate emulators, extreme weather prediction, carbon cycle modeling, and Earth observation analysis. GraphCast, Pangu-Weather, and the AI4Science agenda for Earth systems.
-
52Discovery AI for Social and Economic Systems Agent-based social simulation, causal inference in economics, NLP for social science, and the unique methodological challenges of discovery in complex adaptive systems.
Part VII · Autonomous Discovery Systems
6 chaptersAI scientists, multi-agent discovery teams, self-driving laboratories, system evaluation, governance, and the research frontier of autonomous science.
-
53AI Scientists The AI Scientist v1/v2 (SakanaAI), Google AI Co-Scientist (DeepMind 2025), Coscientist (Nature 2023). Architecture, evaluation, and the frontier of fully autonomous research systems.
-
54Multi-Agent Discovery Systems Orchestrating teams of specialized research agents: literature agents, hypothesis agents, experiment agents, and analysis agents. Coordination, conflict resolution, and emergent discovery.
-
55Self-Driving Laboratories Closed-loop robotic experimentation: liquid handling, analytical instruments, feedback control, and AI orchestration. The fully automated lab as the endpoint of the discovery arc.
-
56Evaluating Discovery Systems DiscoveryBench, MLE-bench, ScienceAgentBench, and FrontierMath. Designing evaluations that measure genuine discovery capability, not benchmark memorization.
-
57Responsible Discovery AI Dual-use risks, biosecurity, attribution of AI-generated discoveries, reproducibility mandates, and the governance frameworks needed for autonomous research systems.
-
58Future Directions Open problems, emerging paradigms, and the research frontier: from hybrid human-AI discovery to fully autonomous science and the long arc toward artificial general intelligence for research.
Appendices · Reference and Pedagogy
2 appendices- AReading PathsGraduate Research Path, Software Practitioner Path, and Domain Scientist Path with chapter-by-chapter schedules.
- BDiscovery Workbench ReferenceComplete API reference and component inventory for the Discovery Workbench platform built across all 58 chapters.
Capstone Tracks · Six End-to-End Projects
6 tracks- ★Track A: AI Research AssistantBuild a full-stack AI research assistant for a scientific domain of your choice, end to end from literature ingestion to evidence report.
- ★Track B: Autonomous Coding OrganizationDeploy a multi-agent software engineering team capable of autonomous feature development across a real repository.
- ★Track C: Molecular Discovery PipelineEnd-to-end generative pipeline from target specification to synthesizable candidate molecules, evaluated against known benchmarks.
- ★Track D: Scientific Knowledge SystemBuild a hypothesis-generating knowledge graph over a domain corpus, with claim validation and ranked hypothesis output.
- ★Track E: Generative Discovery SystemDesign and evaluate a generative model for a scientific design task: molecules, materials, protein sequences, or experimental conditions.
- ★Track F: Multimodal Science PlatformBuild a multimodal scientific reasoning system that connects text, molecular structure, image, and tabular data for a domain of your choice.