{"id":50694530,"url":"https://github.com/velocitatem/cityjepa","last_synced_at":"2026-06-12T08:00:43.560Z","repository":{"id":362920078,"uuid":"1261099663","full_name":"velocitatem/CityJEPA","owner":"velocitatem","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-08T12:22:41.000Z","size":882,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T05:35:55.805Z","etag":null,"topics":["jepa","smart-city","world-models"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/velocitatem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-06T08:29:25.000Z","updated_at":"2026-06-08T12:22:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/velocitatem/CityJEPA","commit_stats":null,"previous_names":["velocitatem/eurotech-hk","velocitatem/cityjepa"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/velocitatem/CityJEPA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2FCityJEPA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2FCityJEPA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2FCityJEPA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2FCityJEPA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velocitatem","download_url":"https://codeload.github.com/velocitatem/CityJEPA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velocitatem%2FCityJEPA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34139178,"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-10T02:00:07.152Z","response_time":89,"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":["jepa","smart-city","world-models"],"created_at":"2026-06-09T05:32:50.105Z","updated_at":"2026-06-10T06:00:54.458Z","avatar_url":"https://github.com/velocitatem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./banner.png)\n\nA self-supervised world model for predicting how Hong Kong evolves under different conditions. The system ingests heterogeneous city data (traffic, weather, hospitals, energy, air quality, finance), encodes it into a shared latent representation, and predicts future city states given a description of what changed (top news).\n\n```\npast city state + transition description → predicted future city state\n```\n\nThe model follows a JEPA architecture: an online encoder and an EMA target encoder learn jointly via cosine similarity in latent space, with a decoder head grounding predictions in observable units. Transition events are fed as pre-computed text embeddings (Qwen3-Embedding-0.6B, 1024-dim) that condition the latent predictor.\n\n**Current finding:** the 1024-dim text embeddings introduce more representational capacity than the training data can constrain. The model fits the text pathway quickly on whatever co-occurrence patterns exist in the training windows and overfits — latent loss drops fast early then plateaus while validation MAE diverges. Without a large corpus of labelled city events, text conditioning adds complexity without adding generalisation. Cross-signal correlations between city domains (weather × finance etc.) are also weak at accessible timescales, meaning the encoder cannot exploit simple linear structure — the city-state transition is genuinely hard to learn from a 2-year panel.\n\n---\n\n## Quick Start\n\n```bash\ncp .env.example .env\nmake init\n```\n\n## ML\n\n```bash\nbun x nx run ml:etl\nbun x nx run ml:train\n```\n\nConfig lives in `ml/configs/`. Artifacts go to `ml/data/processed/`, `ml/models/weights/`, and `ml/tensorboard/`.\n\n## Directory\n\n```\nml/\n  configs/    YAML hyperparameters (data + training)\n  models/     arch.py (UrbanJEPA) + train.py\n  data/       ETL pipeline + loaders + processed artifacts\n  inference.py\napps/\n  webapp/     Next.js dashboard\n  worker/     Celery background worker\ndlib/         Shared utilities (tracing, scraper, agent)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocitatem%2Fcityjepa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelocitatem%2Fcityjepa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocitatem%2Fcityjepa/lists"}