{"id":19199845,"url":"https://github.com/rose-stl-lab/interactive-neural-process","last_synced_at":"2025-07-18T14:32:52.347Z","repository":{"id":174837205,"uuid":"648357697","full_name":"Rose-STL-Lab/Interactive-Neural-Process","owner":"Rose-STL-Lab","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-09T23:11:25.000Z","size":433,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T10:11:12.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rose-STL-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-01T19:35:00.000Z","updated_at":"2024-10-10T05:01:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce561c82-58bc-45cd-8437-34500af81ea2","html_url":"https://github.com/Rose-STL-Lab/Interactive-Neural-Process","commit_stats":null,"previous_names":["rose-stl-lab/interactive-neural-process"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FInteractive-Neural-Process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FInteractive-Neural-Process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FInteractive-Neural-Process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FInteractive-Neural-Process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rose-STL-Lab","download_url":"https://codeload.github.com/Rose-STL-Lab/Interactive-Neural-Process/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208604,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T12:29:10.965Z","updated_at":"2025-04-10T11:23:12.782Z","avatar_url":"https://github.com/Rose-STL-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep Bayesian Active Learning for Accelerating Stochastic Simulation\n\n## Paper: \nDongxia Wu, Ruijia Niu, Matteo Chinazzi, Alessandro Vespignani, Yi-An Ma, Rose Yu, [Deep Bayesian Active Learning for Accelerating Stochastic Simulation](https://arxiv.org/pdf/2106.02770.pdf), KDD 2023\n\n## Requirements\n\nDependency can be installed using the following command:\n```bash\npip install -r requirements.txt\n```\n\n## Abstract\nStochastic simulations such as large-scale, spatiotemporal, age-structured epidemic models are computationally expensive at fine-grained resolution. While deep surrogate models can speed up the simulations, doing so for stochastic simulations and with active learning approaches is an underexplored area. We propose Interactive Neural Process (INP), a deep Bayesian active learning framework for learning deep surrogate models to accelerate stochastic simulations. INP consists of two components, a spatiotemporal surrogate model built upon Neural Process (NP) family and an acquisition function for active learning. For surrogate modeling, we develop Spatiotemporal Neural Process (STNP) to mimic the simulator dynamics. For active learning, we propose a novel acquisition function, Latent Information Gain (LIG), calculated in the latent space of NP based models. We perform a theoretical analysis and demonstrate that LIG reduces sample complexity compared with random sampling in high dimensions. We also conduct empirical studies on three complex spatiotemporal simulators for reaction diffusion, heat flow, and infectious disease. The results demonstrate that STNP outperforms the baselines in the offline learning setting and LIG achieves the state-of-the-art for Bayesian active learning. \n\n## Description\n1. seir/: INP on SEIR simulator for active learning.\n2. reaction_diffusion/: INP on reaction diffusion simulator for active learning. STNP on reaction diffusion simulator for surrogate modeling.\n3. heat/: INP on heat simulator for active learning. STNP on heat simulator for surrogate modeling.\n4. leam_us/: INP on LEAM-US simulator for active learning. STNP on LEAM-US simulator for surrogate modeling.\n\n## Dataset Download\n\n### Reaction Diffusion\n```\ncd Interactive-Neural-Process/reaction_diffusion/\nwget -O data.zip https://roselab1.ucsd.edu/seafile/f/f6145ace6c984256904f/?dl=1\nunzip data.zip\n```\n\n### Heat\n```\ncd Interactive-Neural-Process/heat/\nwget -O data.zip https://roselab1.ucsd.edu/seafile/f/1457be6debeb484fb72c/?dl=1\nunzip data.zip\n```\n\n### LEAM-US\n```\ncd Interactive-Neural-Process/leam_us/active/data\nwget -O data.zip https://roselab1.ucsd.edu/seafile/f/766ef6512667486b8b2c/?dl=1\nunzip data.zip\ncp -r data ../../offline/data\n```\n\n\n## Model Training and Evaluation\n\n\n### SEIR\n```\ncd Interactive-Neural-Process/seir/\npython seir.py\n```\n\n### Reaction Diffusion (Active Learning)\n```\ncd Interactive-Neural-Process/reaction_diffusion/active\npython rd_active_lig.py\n```\n\n### Reaction Diffusion (Surrogate Modeling)\n```\ncd Interactive-Neural-Process/reaction_diffusion/offline\npython rd_offline_stnp.py\n```\n\n### Heat (Active Learning)\n```\ncd Interactive-Neural-Process/heat/active\npython heat_active_lig.py\n```\n\n### Heat (Surrogate Modeling)\n```\ncd Interactive-Neural-Process/heat/offline\npython heat_offline_stnp.py\n```\n\n### LEAM-US (Active Learning)\n```\ncd Interactive-Neural-Process/leam_us/active\npython leam_us_active_lig.py --config_filename=data/model/dcrnn_cov.yaml\n```\n\n### LEAM-US (Surrogate Modeling)\n```\ncd Interactive-Neural-Process/leam_us/offline\npython leam_us_offline_stnp.py --config_filename=data/model/dcrnn_cov.yaml\n```\n\n\n\n## Cite\n```\n@inproceedings{wu2023deep,\n  title={Deep Bayesian Active Learning for Accelerating Stochastic Simulation},\n  author={Wu, Dongxia and Niu, Ruijia and Chinazzi, Matteo and Vespignani, Alessandro and Ma, Yi-An and Yu, Rose},\n  booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery \\\u0026 Data Mining},\n  year={2023}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frose-stl-lab%2Finteractive-neural-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frose-stl-lab%2Finteractive-neural-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frose-stl-lab%2Finteractive-neural-process/lists"}