{"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/efficient-aggregated-kernel-tests-using","title":"Efficient Aggregated Kernel Tests using Incomplete $U$-statistics","arxiv_id":"2206.09194","date":"2022-06-18","proceeding":null,"authors":["Antonin Schrab","Ilmun Kim","Benjamin Guedj","Arthur Gretton"],"abstract":"We propose a series of computationally efficient nonparametric tests for the two-sample, independence, and goodness-of-fit problems, using the Maximum Mean Discrepancy (MMD), Hilbert Schmidt Independence Criterion (HSIC), and Kernel Stein Discrepancy (KSD), respectively. Our test statistics are incomplete $U$-statistics, with a computational cost that interpolates between linear time in the number of samples, and quadratic time, as associated with classical $U$-statistic tests. The three proposed tests aggregate over several kernel bandwidths to detect departures from the null on various scales: we call the resulting tests MMDAggInc, HSICAggInc and KSDAggInc. This procedure provides a solution to the fundamental kernel selection problem as we can aggregate a large number of kernels with several bandwidths without incurring a significant loss of test power. For the test thresholds, we derive a quantile bound for wild bootstrapped incomplete $U$-statistics, which is of independent interest. We derive non-asymptotic uniform separation rates for MMDAggInc and HSICAggInc, and quantify exactly the trade-off between computational efficiency and the attainable rates: this result is novel for tests based on incomplete $U$-statistics, to our knowledge. We further show that in the quadratic-time case, the wild bootstrap incurs no penalty to test power over the more widespread permutation-based approach, since both attain the same minimax optimal rates (which in turn match the rates that use oracle quantiles). We support our claims with numerical experiments on the trade-off between computational efficiency and test power. In all three testing frameworks, the linear-time versions of our proposed tests perform at least as well as the current linear-time state-of-the-art tests.","url_abs":"https://arxiv.org/abs/2206.09194v3","url_pdf":"https://arxiv.org/pdf/2206.09194v3.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":"efficient-aggregated-kernel-tests-using","repo_url":"https://github.com/antoninschrab/ksdagg","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"efficient-aggregated-kernel-tests-using","repo_url":"https://github.com/antoninschrab/agginc-paper","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"efficient-aggregated-kernel-tests-using","repo_url":"https://github.com/antoninschrab/agginc","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"efficient-aggregated-kernel-tests-using","repo_url":"https://github.com/antoninschrab/mmdagg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2206.09194","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.09194"}},"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/antoninschrab/agginc-paper","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/antoninschrab/ksdagg","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/antoninschrab/mmdagg","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/antoninschrab/agginc","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":5,"ran_honours":4,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1},"named_in_paper":{"samples":2,"ran":2,"repositories":1},"listed":{"samples":8,"ran":6,"repositories":2}},"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":"139c7796806ebcb2","entry":"compute_pairwise_matrix","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/np.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/np.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"139c7796806ebcb2"}},{"code_sha256_prefix":"752346c21d60e812","entry":"create_indices","repo":"antoninschrab/agginc-paper","repo_kind":"named_in_paper","path":"agginc/np.py","file_url":"https://github.com/antoninschrab/agginc-paper/blob/HEAD/agginc/np.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"752346c21d60e812"}},{"code_sha256_prefix":"b94b433bd9c69435","entry":"create_indices","repo":"antoninschrab/agginc-paper","repo_kind":"named_in_paper","path":"agginc/jax.py","file_url":"https://github.com/antoninschrab/agginc-paper/blob/HEAD/agginc/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b94b433bd9c69435"}},{"code_sha256_prefix":"35e8a1dce671edd0","entry":"create_weights","repo":"antoninschrab/ksdagg","repo_kind":"official","path":"ksdagg/jax.py","file_url":"https://github.com/antoninschrab/ksdagg/blob/HEAD/ksdagg/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35e8a1dce671edd0"}},{"code_sha256_prefix":"ade4e10146ee1a5c","entry":"create_weights","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/jax.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ade4e10146ee1a5c"}},{"code_sha256_prefix":"f3d6af9cdda0f3d5","entry":"jax_distances","repo":"antoninschrab/ksdagg","repo_kind":"official","path":"ksdagg/jax.py","file_url":"https://github.com/antoninschrab/ksdagg/blob/HEAD/ksdagg/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3d6af9cdda0f3d5"}},{"code_sha256_prefix":"2c48c4eb0714eef3","entry":"kernel_matrix","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/jax.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c48c4eb0714eef3"}},{"code_sha256_prefix":"4e7beb2199214856","entry":"kernel_matrix","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/np.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/np.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e7beb2199214856"}},{"code_sha256_prefix":"6fe45123a54a45b7","entry":"mmdagg","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/jax.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6fe45123a54a45b7"}},{"code_sha256_prefix":"e46e1093bf2aa225","entry":"mmdagg","repo":"antoninschrab/mmdagg","repo_kind":"listed","path":"mmdagg/np.py","file_url":"https://github.com/antoninschrab/mmdagg/blob/HEAD/mmdagg/np.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e46e1093bf2aa225"}},{"code_sha256_prefix":"52b452b4fab9d208","entry":"agginc","repo":"antoninschrab/agginc","repo_kind":"listed","path":"agginc/np.py","file_url":"https://github.com/antoninschrab/agginc/blob/HEAD/agginc/np.py","link_basis":"harvester_set","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":"52b452b4fab9d208"}},{"code_sha256_prefix":"2c9d9a068ef0b1e9","entry":"inc","repo":"antoninschrab/agginc","repo_kind":"listed","path":"agginc/np.py","file_url":"https://github.com/antoninschrab/agginc/blob/HEAD/agginc/np.py","link_basis":"harvester_set","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":"2c9d9a068ef0b1e9"}},{"code_sha256_prefix":"c07fb17178973f65","entry":"ksdagg","repo":"antoninschrab/ksdagg","repo_kind":"official","path":"ksdagg/jax.py","file_url":"https://github.com/antoninschrab/ksdagg/blob/HEAD/ksdagg/jax.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":"c07fb17178973f65"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}