{"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/horopca-hyperbolic-dimensionality-reduction","title":"HoroPCA: Hyperbolic Dimensionality Reduction via Horospherical Projections","arxiv_id":"2106.03306","date":"2021-06-07","proceeding":null,"authors":["Ines Chami","Albert Gu","Dat Nguyen","Christopher Ré"],"abstract":"This paper studies Principal Component Analysis (PCA) for data lying in hyperbolic spaces. Given directions, PCA relies on: (1) a parameterization of subspaces spanned by these directions, (2) a method of projection onto subspaces that preserves information in these directions, and (3) an objective to optimize, namely the variance explained by projections. We generalize each of these concepts to the hyperbolic space and propose HoroPCA, a method for hyperbolic dimensionality reduction. By focusing on the core problem of extracting principal directions, HoroPCA theoretically better preserves information in the original data such as distances, compared to previous generalizations of PCA. Empirically, we validate that HoroPCA outperforms existing dimensionality reduction methods, significantly reducing error in distance preservation. As a data whitening method, it improves downstream classification by up to 3.9% compared to methods that don't use whitening. Finally, we show that HoroPCA can be used to visualize hyperbolic data in two dimensions.","url_abs":"https://arxiv.org/abs/2106.03306v1","url_pdf":"https://arxiv.org/pdf/2106.03306v1.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":"horopca-hyperbolic-dimensionality-reduction","repo_url":"https://github.com/HazyResearch/HoroPCA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"dimensionality-reduction","task_name":"Dimensionality Reduction"}],"methods":[{"method_slug":"pca","method_name":"PCA"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.03306","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.03306"}},"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/HazyResearch/HoroPCA","reach":null}],"summary":{"ran":1,"ran_fixture":3,"ran_draft_wrong":19,"unverified":6},"by_repo_kind":{"listed":{"samples":29,"ran":23,"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":29,"samples":[{"code_sha256_prefix":"14639b741e61a2ac","entry":"Frechet","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"14639b741e61a2ac"}},{"code_sha256_prefix":"2cd73f04941c824f","entry":"avg_distortion_measures","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2cd73f04941c824f"}},{"code_sha256_prefix":"4f53dff5bc492fa6","entry":"bilinear_pairing","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f53dff5bc492fa6"}},{"code_sha256_prefix":"28baecbc84c248a8","entry":"busemann","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"28baecbc84c248a8"}},{"code_sha256_prefix":"7ff05678943aae7c","entry":"busemann_to_horocycle","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7ff05678943aae7c"}},{"code_sha256_prefix":"1faaa541998d4b4c","entry":"circle_intersection_","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1faaa541998d4b4c"}},{"code_sha256_prefix":"434b92113b2560b5","entry":"distance","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"434b92113b2560b5"}},{"code_sha256_prefix":"caad5cf1736c5c6b","entry":"exp_unit_tangents","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"caad5cf1736c5c6b"}},{"code_sha256_prefix":"ff930f06f4b7b5f8","entry":"expmap","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ff930f06f4b7b5f8"}},{"code_sha256_prefix":"c960fb525ac560d2","entry":"frechet_var_approx","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c960fb525ac560d2"}},{"code_sha256_prefix":"a4880a4d1201ee27","entry":"from_poincare","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4880a4d1201ee27"}},{"code_sha256_prefix":"43470685e618cada","entry":"l2_error","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"43470685e618cada"}},{"code_sha256_prefix":"8b14c36c44fb3d95","entry":"lambda_","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b14c36c44fb3d95"}},{"code_sha256_prefix":"514aa3ae1094d6b7","entry":"logmap","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"514aa3ae1094d6b7"}},{"code_sha256_prefix":"c62d18394183b201","entry":"mobius_add","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c62d18394183b201"}},{"code_sha256_prefix":"7ae021ffa7f0e179","entry":"orthonormal","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7ae021ffa7f0e179"}},{"code_sha256_prefix":"848d19b58477d862","entry":"project_kd","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"848d19b58477d862"}},{"code_sha256_prefix":"b27bf07973e6d258","entry":"sphere_intersection","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b27bf07973e6d258"}},{"code_sha256_prefix":"d5bde1f6bbd86a02","entry":"sphere_intersections","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5bde1f6bbd86a02"}},{"code_sha256_prefix":"5b820c5edbb7ae7c","entry":"squared_norm","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b820c5edbb7ae7c"}},{"code_sha256_prefix":"2e10341cd9d7c7d0","entry":"to_poincare","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e10341cd9d7c7d0"}},{"code_sha256_prefix":"459d1fe8134eef0e","entry":"unexplained_variance","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"459d1fe8134eef0e"}},{"code_sha256_prefix":"9f9a0c6b28c7f2f1","entry":"worst_case_distortion","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f9a0c6b28c7f2f1"}},{"code_sha256_prefix":"f8f8befdda7552f5","entry":"HoroPCA","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f8f8befdda7552f5"}},{"code_sha256_prefix":"ec2ea2e6a62dd179","entry":"PCA","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ec2ea2e6a62dd179"}},{"code_sha256_prefix":"8bc9911c8e39f9ef","entry":"compute_metrics","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8bc9911c8e39f9ef"}},{"code_sha256_prefix":"2829a620799b162f","entry":"horo_projection","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2829a620799b162f"}},{"code_sha256_prefix":"7680da264e7302a6","entry":"orthogonal_projection","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7680da264e7302a6"}},{"code_sha256_prefix":"0bb20e50583bc7e3","entry":"pairwise_distance","repo":"HazyResearch/HoroPCA","repo_kind":"listed","path":"learning/pca.py","file_url":"https://github.com/HazyResearch/HoroPCA/blob/HEAD/learning/pca.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0bb20e50583bc7e3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}