{"id":50970698,"url":"https://github.com/rickmer-schulte/rethinking-neural-id","last_synced_at":"2026-06-19T02:01:40.667Z","repository":{"id":354062373,"uuid":"1192808490","full_name":"rickmer-schulte/rethinking-neural-id","owner":"rickmer-schulte","description":"Code for the AISTATS 2026 paper: Rethinking Intrinsic Dimension Estimation in Neural Representations","archived":false,"fork":false,"pushed_at":"2026-04-26T23:30:43.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T01:22:45.671Z","etag":null,"topics":["entropy","intrinsic-dimension","llms","manifolds","neural-representations","vision-models"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/rickmer-schulte.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T15:26:07.000Z","updated_at":"2026-04-26T23:30:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rickmer-schulte/rethinking-neural-id","commit_stats":null,"previous_names":["rickmer-schulte/rethinking-neural-id"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rickmer-schulte/rethinking-neural-id","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickmer-schulte%2Frethinking-neural-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickmer-schulte%2Frethinking-neural-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickmer-schulte%2Frethinking-neural-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickmer-schulte%2Frethinking-neural-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickmer-schulte","download_url":"https://codeload.github.com/rickmer-schulte/rethinking-neural-id/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickmer-schulte%2Frethinking-neural-id/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34514285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["entropy","intrinsic-dimension","llms","manifolds","neural-representations","vision-models"],"created_at":"2026-06-19T02:01:38.356Z","updated_at":"2026-06-19T02:01:40.651Z","avatar_url":"https://github.com/rickmer-schulte.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rethinking Intrinsic Dimension Estimation in Neural Representations\nThis repository contains the code for the experiments and figures of the AISTATS 2026 paper: \"Rethinking Intrinsic Dimension Estimation in Neural Representations\".\n\n## Project Structure\n```text\n.\n├── data/\n│   ├── raw/\n│   └── reps/\n├── docs/\n│   ├── setup.md\n│   └── experiments.md\n├── results/\n│   ├── cnns/\n│   ├── llms/\n│   └── vits/\n├── scripts/\n│   ├── bias_analysis/\n│   ├── cnn_analysis/\n│   ├── llm_analysis/\n│   └── vit_analysis/\n└── src/\n    └── rethinking_neural_id/\n```\n\n`scripts/` contains the user-facing reproduction entrypoints. `src/rethinking_neural_id/` is a light internal namespace that keeps shared paths, registries, metrics, and pipelines import-stable across shells and notebooks.\n\n## Python Setup\n```bash\n# Clone the repository\ngit clone https://github.com/rickmer-schulte/rethinking-neural-id.git\ncd rethinking-neural-id\n\n# Install the local reproduction environment\nuv sync --extra metrics --extra torch --extra bias --extra notebooks --extra dev\n```\n\nFor LLM extraction:\n```bash\nuv sync --extra metrics --extra torch --extra llm --extra bias --extra notebooks --extra dev\n```\n\nDownload and prepare raw text and image data:\n```bash\nuv run python scripts/prepare_raw_data.py\n```\n\n## Quick Start\n\nExtract CNN representations and compute metrics:\n```bash\nuv run python scripts/cnn_analysis/cnn_reps_computation.py --arch resnet18 --trained 1\n```\n\nExtract LLM representations (e.g. from [Llama-3.1-8B](https://huggingface.co/meta-llama/Llama-3.1-8B) model):\n```bash\nuv run python scripts/llm_analysis/extract_llm_representations.py \\\n  --model-name meta-llama/Llama-3.1-8B \\\n  --model-key llama \\\n  --dataset wikitext \\\n  --shard aa \\\n  --data-file data/raw/texts/wikitext/shard_aa \\\n  --quantization 8bit\n```\n\nCompute LLM metrics (e.g. ID estimation on llama reps via gride):\n```bash\nuv run python scripts/llm_analysis/compute_layerwise_metrics.py \\\n  --model llama \\\n  --dataset wikitext \\\n  --shard aa \\\n  --method gride\n```\n\nExtract ViT representations (e.g. from \n[vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) model):\n```bash\nuv run python scripts/vit_analysis/extract_vit_representations.py \\\n  --model-name google/vit-base-patch16-224 \\\n  --model-key vit-base \\\n  --dataset imagenet7 \\\n  --category-tag mix \\\n  --nsamples 5000\n```\n\nCompute ViT metrics (e.g. entropy estimation for vit-base reps):\n```bash\nuv run python scripts/vit_analysis/compute_layerwise_metrics_vits.py \\\n  --model vit-base \\\n  --dataset imagenet7 \\\n  --category mix \\\n  --method entropy\n```\n\nSee [docs/setup.md](docs/setup.md) for environment details and [docs/experiments.md](docs/experiments.md) for experimental details.\n\n## Citation\n```bibtex\n@inproceedings{\nschulte2026rethinking,\ntitle={Rethinking Intrinsic Dimension Estimation in Neural Representations},\nauthor={Rickmer Schulte and David R{\\\"u}gamer},\nbooktitle={The 29th International Conference on Artificial Intelligence and Statistics},\nyear={2026},\nurl={https://openreview.net/forum?id=kH1gPRbYqh}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickmer-schulte%2Frethinking-neural-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickmer-schulte%2Frethinking-neural-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickmer-schulte%2Frethinking-neural-id/lists"}