{"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/single-seed-generation-of-brownian-paths-and","title":"Single-seed generation of Brownian paths and integrals for adaptive and high order SDE solvers","arxiv_id":"2405.06464","date":"2024-05-10","proceeding":null,"authors":["Andraž Jelinčič","James Foster","Patrick Kidger"],"abstract":"Despite the success of adaptive time-stepping in ODE simulation, it has so far seen few applications for Stochastic Differential Equations (SDEs). To simulate SDEs adaptively, methods such as the Virtual Brownian Tree (VBT) have been developed, which can generate Brownian motion (BM) non-chronologically. However, in most applications, knowing only the values of Brownian motion is not enough to achieve a high order of convergence; for that, we must compute time-integrals of BM such as $\\int_s^t W_r \\, dr$. With the aim of using high order SDE solvers adaptively, we extend the VBT to generate these integrals of BM in addition to the Brownian increments. A JAX-based implementation of our construction is included in the popular Diffrax library (https://github.com/patrick-kidger/diffrax). Since the entire Brownian path produced by VBT is uniquely determined by a single PRNG seed, previously generated samples need not be stored, which results in a constant memory footprint and enables experiment repeatability and strong error estimation. Based on binary search, the VBT's time complexity is logarithmic in the tolerance parameter $\\varepsilon$. Unlike the original VBT algorithm, which was only precise at some dyadic times, we prove that our construction exactly matches the joint distribution of the Brownian motion and its time integrals at any query times, provided they are at least $\\varepsilon$ apart. We present two applications of adaptive high order solvers enabled by our new VBT. Using adaptive solvers to simulate a high-volatility CIR model, we achieve more than twice the convergence order of constant stepping. We apply an adaptive third order underdamped or kinetic Langevin solver to an MCMC problem, where our approach outperforms the No U-Turn Sampler, while using only a tenth of its function evaluations.","url_abs":"https://arxiv.org/abs/2405.06464v3","url_pdf":"https://arxiv.org/pdf/2405.06464v3.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":"single-seed-generation-of-brownian-paths-and","repo_url":"https://github.com/andyelking/diffrax_stla","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":null},{"paper_slug":"single-seed-generation-of-brownian-paths-and","repo_url":"https://github.com/patrick-kidger/diffrax","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":null},{"paper_slug":"single-seed-generation-of-brownian-paths-and","repo_url":"https://github.com/andyElking/Single-seed_BrownianMotion","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2405.06464","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.06464"}},"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/patrick-kidger/diffrax","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/andyElking/Single-seed_BrownianMotion","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/andyelking/diffrax_stla","reach":null}],"summary":{"ran_fixture":1,"ran_draft_wrong":2,"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"ran":2,"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":3,"samples":[{"code_sha256_prefix":"7d9c5d560b31ba1d","entry":"animated_funnel_plot","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"7d9c5d560b31ba1d"}},{"code_sha256_prefix":"f7211952004f3b66","entry":"draw_order_multiple","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"f7211952004f3b66"}},{"code_sha256_prefix":"77765dfe637947ed","entry":"draw_order_multiple_dict","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"77765dfe637947ed"}},{"code_sha256_prefix":"ad98971af8db6862","entry":"fill_forward","repo":"andyElking/Single-seed_BrownianMotion","repo_kind":"official","path":"diffrax/_misc.py","file_url":"https://github.com/andyElking/Single-seed_BrownianMotion/blob/HEAD/diffrax/_misc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ad98971af8db6862"}},{"code_sha256_prefix":"3e25e41e60b56ecf","entry":"linear_rescale","repo":"andyElking/Single-seed_BrownianMotion","repo_kind":"official","path":"diffrax/_misc.py","file_url":"https://github.com/andyElking/Single-seed_BrownianMotion/blob/HEAD/diffrax/_misc.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3e25e41e60b56ecf"}},{"code_sha256_prefix":"f28e8f6e48260d6c","entry":"force_bitcast_convert_type","repo":"andyElking/Single-seed_BrownianMotion","repo_kind":"official","path":"diffrax/_misc.py","file_url":"https://github.com/andyElking/Single-seed_BrownianMotion/blob/HEAD/diffrax/_misc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f28e8f6e48260d6c"}},{"code_sha256_prefix":"608158677e65bc68","entry":"linear_interpolation","repo":"andyElking/Single-seed_BrownianMotion","repo_kind":"official","path":"diffrax/_global_interpolation.py","file_url":"https://github.com/andyElking/Single-seed_BrownianMotion/blob/HEAD/diffrax/_global_interpolation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"608158677e65bc68"}},{"code_sha256_prefix":"2820b05b22a31c4f","entry":"rectilinear_interpolation","repo":"andyElking/Single-seed_BrownianMotion","repo_kind":"official","path":"diffrax/_global_interpolation.py","file_url":"https://github.com/andyElking/Single-seed_BrownianMotion/blob/HEAD/diffrax/_global_interpolation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2820b05b22a31c4f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}