{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/flow-based-distributionally-robust","title":"Flow-based Distributionally Robust Optimization","arxiv_id":"2310.19253","date":"2023-10-30","proceeding":null,"authors":["Chen Xu","JongHyeok Lee","Xiuyuan Cheng","Yao Xie"],"abstract":"We present a computationally efficient framework, called $\\texttt{FlowDRO}$, for solving flow-based distributionally robust optimization (DRO) problems with Wasserstein uncertainty sets while aiming to find continuous worst-case distribution (also called the Least Favorable Distribution, LFD) and sample from it. The requirement for LFD to be continuous is so that the algorithm can be scalable to problems with larger sample sizes and achieve better generalization capability for the induced robust algorithms. To tackle the computationally challenging infinitely dimensional optimization problem, we leverage flow-based models and continuous-time invertible transport maps between the data distribution and the target distribution and develop a Wasserstein proximal gradient flow type algorithm. In theory, we establish the equivalence of the solution by optimal transport map to the original formulation, as well as the dual form of the problem through Wasserstein calculus and Brenier theorem. In practice, we parameterize the transport maps by a sequence of neural networks progressively trained in blocks by gradient descent. We demonstrate its usage in adversarial learning, distributionally robust hypothesis testing, and a new mechanism for data-driven distribution perturbation differential privacy, where the proposed method gives strong empirical performance on high-dimensional real data.","url_abs":"https://arxiv.org/abs/2310.19253v4","url_pdf":"https://arxiv.org/pdf/2310.19253v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"flow-based-distributionally-robust","repo_url":"https://github.com/hamrel-cxu/flowdro","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.19253","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.19253"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hamrel-cxu/flowdro","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"57058ab7109d577c","entry":"normalize_tensor","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"eval_mnist_models_torch.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/eval_mnist_models_torch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57058ab7109d577c"}},{"code_sha256_prefix":"bd0d573d8954e863","entry":"frm","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"train_mnist_models_torch_binary.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/train_mnist_models_torch_binary.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd0d573d8954e863"}},{"code_sha256_prefix":"eb2bbd920924c80f","entry":"frm","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"train_mnist_models_torch_full.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/train_mnist_models_torch_full.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eb2bbd920924c80f"}},{"code_sha256_prefix":"cf4a651b674f1eab","entry":"frm_wrapper","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"train_mnist_models_torch_binary.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/train_mnist_models_torch_binary.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf4a651b674f1eab"}},{"code_sha256_prefix":"e6ed52448beaa74d","entry":"frm_wrapper","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"train_mnist_models_torch_full.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/train_mnist_models_torch_full.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6ed52448beaa74d"}},{"code_sha256_prefix":"3620e0f0fc09ab12","entry":"get_data_loader","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"eval_mnist_models_torch.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/eval_mnist_models_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3620e0f0fc09ab12"}},{"code_sha256_prefix":"e419bfacc6a963d5","entry":"get_data_loader_full","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"eval_mnist_models_torch.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/eval_mnist_models_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e419bfacc6a963d5"}},{"code_sha256_prefix":"70bc0106c21d90e4","entry":"plot_attack_errs","repo":"hamrel-cxu/flowdro","repo_kind":"official","path":"plot_torch.py","file_url":"https://github.com/hamrel-cxu/flowdro/blob/HEAD/plot_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"70bc0106c21d90e4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}