{"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/novel-matrix-hit-and-run-for-sampling","title":"Novel Matrix Hit and Run for Sampling Polytopes and Its GPU Implementation","arxiv_id":"2104.07097","date":"2021-04-14","proceeding":null,"authors":["Mario Vazquez Corte","Luis V. Montiel"],"abstract":"We propose and analyze a new Markov Chain Monte Carlo algorithm that generates a uniform sample over full and non-full dimensional polytopes. This algorithm, termed \"Matrix Hit and Run\" (MHAR), is a modification of the Hit and Run framework. For the regime $n^{1+\\frac{1}{3}} \\ll m$, MHAR has a lower asymptotic cost per sample in terms of soft-O notation ($\\SO$) than do existing sampling algorithms after a \\textit{warm start}. MHAR is designed to take advantage of matrix multiplication routines that require less computational and memory resources. Our tests show this implementation to be substantially faster than the \\textit{hitandrun} R package, especially for higher dimensions. Finally, we provide a python library based on Pytorch and a Colab notebook with the implementation ready for deployment in architectures with GPU or just CPU.","url_abs":"https://arxiv.org/abs/2104.07097v1","url_pdf":"https://arxiv.org/pdf/2104.07097v1.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"novel-matrix-hit-and-run-for-sampling","repo_url":"https://github.com/uumami/mhar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}