{"id":20652435,"url":"https://github.com/thesofakillers/ponder-bayes","last_synced_at":"2026-02-14T12:37:20.562Z","repository":{"id":70962604,"uuid":"486612698","full_name":"thesofakillers/ponder-bayes","owner":"thesofakillers","description":"Official repository for the paper \"PonderBayes: Uncertainty-Informed Pondering\". Not published.","archived":false,"fork":false,"pushed_at":"2022-10-16T17:34:41.000Z","size":7642,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T19:03:32.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesofakillers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-28T13:47:29.000Z","updated_at":"2023-09-02T18:56:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0e266a2-89f6-437d-8c42-c6007783cbcd","html_url":"https://github.com/thesofakillers/ponder-bayes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thesofakillers/ponder-bayes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2Fponder-bayes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2Fponder-bayes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2Fponder-bayes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2Fponder-bayes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesofakillers","download_url":"https://codeload.github.com/thesofakillers/ponder-bayes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2Fponder-bayes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T17:34:58.384Z","updated_at":"2026-02-14T12:37:20.546Z","avatar_url":"https://github.com/thesofakillers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PonderBayes\n\nOfficial repository for the paper \"PonderBayes: Rationally Pondering Neural\nNetworks\" (Not submitted to peer review, but available for a browse in this\nrepository)\n\n## Requirements and Setup\n\nDetails such as python and package versions can be found in the generated\n[pyproject.toml](pyproject.toml) and [poetry.lock](poetry.lock) files.\n\nWe recommend using an environment manager such as\n[conda](https://docs.conda.io/en/latest/). After setting up your environment\nwith the correct python version, please proceed with the installation of the\nrequired packages\n\nFor [poetry](https://python-poetry.org/) users, getting setup is as easy as\nrunning\n\n```terminal\npoetry install\n```\n\nWe also provide a [requirements.txt](requirements.txt) file for\n[pip](https://pypi.org/project/pip/) users who do not wish to use poetry. In\nthis case, simply run\n\n```terminal\npip install -r requirements.txt\n```\n\nThis `requirements.txt` file is generated by running the following\n\n```terminal\nsh gen_pip_reqs.sh\n```\n\n### Additional/Optional Requirements\n\nSome additional requirements are necessary for running\n[notebooks/accuracies.ipynb](notebooks/accuracies.ipynb), which is the notebook\nwe use for generating figures and tables:\n\n- A complete TeXLive/MacTeX installation is required, since we make use of a TeX\n  backend for our figure plots.\n- Our pretrained and pretested checkpoints and logs, available on\n  [The Internet Archive](http://archive.org/) at\n  [this link](https://archive.org/download/ponderbayes/models.zip)\n  - please unzip the checkpoints and place them as the `models/` directory under\n    the root of the project\n\n## Project Organization\n\n```plaintext\n    ├── LICENSE\n    ├── README.md              \u003c- The top-level README for developers using this project.\n    ├── data/\n    │   ├── interim/           \u003c- Intermediate data that has been transformed.\n    │   ├── processed/         \u003c- The final, canonical data sets for modeling.\n    │   └── raw/               \u003c- The original, immutable data dump.\n    ├── models/                \u003c- Trained and serialized models and logs\n    ├── notebooks/             \u003c- Jupyter notebooks.\n    │   └── accuracies.ipynb   \u003c- Notebook for generating figures and tables\n    ├── reports/               \u003c- Generated analysis as HTML, PDF, LaTeX, etc.\n    ├── lisa/                  \u003c- LISA (slurm compute) scripts, jobs, config.\n    ├── pyproject.toml         \u003c- project metadata, handled by poetry.\n    ├── poetry.lock            \u003c- resolving and locking dependencies, handled by poetry.\n    ├── requirements.txt       \u003c- for non-poetry users.\n    ├── gen_pip_reqs.sh        \u003c- for generating the pip requirements.txt file\n    └── ponderbayes/           \u003c- Source code for use in this project.\n        ├── __init__.py        \u003c- Makes src a Python module\n        ├── data/              \u003c- Scripts to download or generate data\n        ├── models/            \u003c- Model definitions\n        ├── run/               \u003c- scripts to train, evaluate and use models\n        ├── utils.py           \u003c- miscellaneous utils\n        └── visualization/     \u003c- Scripts for visualization\n```\n\nThe project structure is largely based on the\n[cookiecutter data-science template](https://github.com/drivendata/cookiecutter-data-science).\nThis is purposely opinionated so that paths align over collaborators without\nhaving to edit config files. Users may find the\n[cookiecutter data-science opinions page](http://drivendata.github.io/cookiecutter-data-science/#opinions),\nof relevance\n\nThe top level `data/` and `models/` directory are in version control only to\nshow structure. Their contents will not be committed and are ignored via\n`.gitignore`.\n\n## Usage\n\nFor training, refer to `ponderbayes/run/train.py`:\n\n```stdout\nusage: train.py [-h] [-s SEED] [--disable-logging]\n                [--model {pondernet,groupthink,RGT,lambdaGT,aRGT}]\n                [-c CHECKPOINT] [--n-elems N_ELEMS] [--n-hidden N_HIDDEN]\n                [--max-steps MAX_STEPS] [--lambda-p LAMBDA_P] [--beta BETA]\n                [--progress-bar] [--n-train-samples N_TRAIN_SAMPLES]\n                [--n-eval-samples N_EVAL_SAMPLES] [--mode MODE]\n                [--batch-size BATCH_SIZE] [--num-workers NUM_WORKERS]\n                [--early_stopping] [--val-check-interval VAL_CHECK_INTERVAL]\n                [--n-iter N_ITER] [--ensemble-size ENSEMBLE_SIZE]\n\nTrain a model\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -s SEED, --seed SEED  The seed to use for random number generation\n  --disable-logging     Disable logging\n  --model {pondernet,groupthink,RGT,lambdaGT,aRGT}\n                        What model variant to use\n  -c CHECKPOINT, --checkpoint CHECKPOINT\n                        path to a checkpoint from which to resume training\n                        from\n  --n-elems N_ELEMS     Number of elements in the parity vectors\n  --n-hidden N_HIDDEN   Number of hidden elements in the reccurent cell\n  --max-steps MAX_STEPS\n                        Maximum number of pondering steps\n  --lambda-p LAMBDA_P   Geometric prior distribution hyperparameter\n  --beta BETA           Regularization loss coefficient\n  --progress-bar        whether to show the progress bar\n  --n-train-samples N_TRAIN_SAMPLES\n                        The number of training samples to comprising the\n                        dataset\n  --n-eval-samples N_EVAL_SAMPLES\n                        The number of training samples to comprising the\n                        dataset\n  --mode MODE           Whether to perform 'interpolation' or 'extrapolation'\n  --batch-size BATCH_SIZE\n                        Batch size\n  --num-workers NUM_WORKERS\n                        The number of workers\n  --early_stopping      Whether to use early stopping\n  --val-check-interval VAL_CHECK_INTERVAL\n                        Evaluate every x amount of steps, as opposed to every\n                        epoch\n  --n-iter N_ITER       Number of training steps to use\n  --ensemble-size ENSEMBLE_SIZE\n                        Number of models to ensemble\n\n```\n\nFor testing, refer to `ponderbayes/run/test.py`:\n\n```stdout\nusage: test.py [-h] [-s SEED] -c CHECKPOINT [--progress-bar]\n               [--n-test-samples N_TEST_SAMPLES] [--batch-size BATCH_SIZE]\n               [--num-workers NUM_WORKERS]\n\nTest a pondernet checkpoint\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -s SEED, --seed SEED  The seed to use for random number generation\n  -c CHECKPOINT, --checkpoint CHECKPOINT\n                        path (relative to root) to a checkpoint to evaluate\n  --progress-bar        whether to show the progress bar\n  --n-test-samples N_TEST_SAMPLES\n                        The number of testing samples to comprise the dataset\n  --batch-size BATCH_SIZE\n                        Batch size\n  --num-workers NUM_WORKERS\n                        The number of workers\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesofakillers%2Fponder-bayes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesofakillers%2Fponder-bayes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesofakillers%2Fponder-bayes/lists"}