{"id":19199838,"url":"https://github.com/rose-stl-lab/dynamic-adaptation-network","last_synced_at":"2025-10-07T16:49:42.016Z","repository":{"id":61749180,"uuid":"410947538","full_name":"Rose-STL-Lab/Dynamic-Adaptation-Network","owner":"Rose-STL-Lab","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-30T14:05:47.000Z","size":78,"stargazers_count":28,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T01:37:33.278Z","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}},"created_at":"2021-09-27T15:48:57.000Z","updated_at":"2025-03-29T05:46:57.000Z","dependencies_parsed_at":"2022-10-20T17:45:29.881Z","dependency_job_id":"d04ee180-3292-42f4-9ad7-e41c52fa326a","html_url":"https://github.com/Rose-STL-Lab/Dynamic-Adaptation-Network","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rose-STL-Lab/Dynamic-Adaptation-Network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FDynamic-Adaptation-Network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FDynamic-Adaptation-Network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FDynamic-Adaptation-Network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FDynamic-Adaptation-Network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rose-STL-Lab","download_url":"https://codeload.github.com/Rose-STL-Lab/Dynamic-Adaptation-Network/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rose-STL-Lab%2FDynamic-Adaptation-Network/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278811832,"owners_count":26050181,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:09.646Z","updated_at":"2025-10-07T16:49:41.976Z","avatar_url":"https://github.com/Rose-STL-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Paper: \nRui Wang*, Robin Walters*, Rose Yu; [Meta-learning dynamics forecasting using task inference](https://arxiv.org/abs/2102.10271); Neural Information Processing Systems (NeurIPS) 2022.\n\n## Abstract:\nCurrent deep learning models for dynamics forecasting struggle with generalization. They can only forecast in a specific domain and fail when applied to systems with different parameters, external forces, or boundary conditions. We propose a model-based meta-learning method called DyAd which can generalize across heterogeneous domains by partitioning them into different tasks. DyAd has two parts: an encoder which infers the time-invariant hidden features of the task with weak supervision, and a forecaster which learns the shared dynamics of the entire domain. The encoder adapts and controls the forecaster during inference using adaptive instance normalization and adaptive padding. Theoretically, we prove that the generalization error of such procedure is related to the task relatedness in the source domain, as well as the domain differences between source and target. Experimentally, we demonstrate that our model outperforms state-of-the-art approaches on both turbulent flow and real-world ocean data forecasting tasks.\n\n\n## Requirements\n- To install requirements\n```\npip install -r requirements.txt\n```\n\n## Setup\nInstall PhiFlow v1.0.1 and place the data_generation.py in the downloaded PhiFlow folder.\n```\ngit clone -b 1.0.1 --single-branch https://github.com/tum-pbs/PhiFlow.git\n```\n\nGenerate turbulent flow dataset with PhiFlow.\n```\npython data_generation.py\n```\n\n## Running the model\nTrain the encoder.\n```\npython encoder_train.py\n```\n\nTrain the forecaster.\n```\npython run_model.py\n```\n\nEvaluate the predictions on two test sets.\n```\npython evaluation.py\n```\n\n## Cite\n```\n@article{wang2022meta,\n  title={Meta-learning dynamics forecasting using task inference},\n  author={Wang, Rui and Walters, Robin and Yu, Rose},\n  journal={Advances in Neural Information Processing Systems},\n  volume={35},\n  pages={21640--21653},\n  year={2022}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frose-stl-lab%2Fdynamic-adaptation-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frose-stl-lab%2Fdynamic-adaptation-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frose-stl-lab%2Fdynamic-adaptation-network/lists"}