--- title: Andrej Janchevski - PhD Research emoji: ๐Ÿ“š colorFrom: green colorTo: gray sdk: docker app_port: 7860 pinned: false license: mit --- # Andrej Janchevski โ€” PhD Research Live demos for the PhD thesis _Scalable Methods for Knowledge Graph Reasoning and Generation_ (Andrej Janchevski, EPFL, 2025). The thesis is mirrored at [infoscience.epfl.ch](https://infoscience.epfl.ch/entities/publication/87acf391-feef-43a0-b665-7f2f0bc70b2c); a CV is rendered at `/cv` from `docs/cvAndrejJanchevski.pdf`. The site is a single Django + Vue Docker container. The Django backend serves a stateless REST API at `/api/v1/*` and WhiteNoise serves the built Vue SPA on every other path โ€” same origin, no CORS in production. Deployment target: Hugging Face [Space](docs/glossary.md#hf-space) `Bani57/website` โ†’ . ## What's in the demos | Demo | Thesis | What it does | |---|---|---| | [COINs](docs/glossary.md#coins) โ€” KG reasoning | ยง3.1 | Link prediction and multi-hop / intersection query answering on FB15k-237, WN18RR and NELL-995, with six embedding algorithms (TransE, DistMult, ComplEx, RotatE, Q2B, KBGAT). | | [MultiProxAn](docs/glossary.md#multiproxan) โ€” graph generation | ยง4.3 | Discrete denoising diffusion for molecular and synthetic graphs, with an outer Gibbs loop (MultiProx) that round-trips through `/continue` for live previews. | | KG anomaly correction | ยง4.4 | Diffusion-based denoising of knowledge-graph subgraphs with a per-frame KG log-likelihood metric from the frozen COINs link ranker. | ## Layout ``` . โ”œโ”€โ”€ Dockerfile, environment.yml, docker-compose.yml, entrypoint.sh, .dockerignore โ”œโ”€โ”€ README.md # this file (also the HF Space landing card) โ”œโ”€โ”€ src/backend/ # Django REST API โ”œโ”€โ”€ src/frontend/ # Vue 3 SPA โ”œโ”€โ”€ src/research/ # research code, imported via sys.path โ”œโ”€โ”€ scripts/ # one-off helpers (checkpoint upload, motif export) โ”œโ”€โ”€ docs/ # technical documentation (start at docs/README.md) โ””โ”€โ”€ plans/ # implementation plans for major work ``` ## Quick start ### Option A โ€” Docker (production-equivalent) ```bash cp .env.example .env python -c "import secrets; print('DJANGO_SECRET_KEY=' + secrets.token_urlsafe(50))" >> .env docker compose up --build ``` `http://localhost:7860`. First build is ~20โ€“30 minutes (mamba env solve, GPU torch wheels, frontend bundle, ~5.4 GB checkpoint pull from HF Hub). Subsequent runs reuse layer cache and the `checkpoints` named volume. ### Option B โ€” local Python + Vite (dev) ```bash mamba env create -n website_c -f environment.yml mamba activate website_c pip install --extra-index-url https://download.pytorch.org/whl/cu118 -r src/backend/requirements.txt ( cd src/backend && DJANGO_DEBUG=True python manage.py runserver 8000 ) & ( cd src/frontend && npm install && npm run dev ) ``` Backend on `:8000`, Vite on `:5173`. The dev frontend env file points the SPA at the local backend. Full instructions: [`docs/guides/local-development.md`](docs/guides/local-development.md). ## Documentation The [`docs/`](docs/) directory holds the full documentation set, organized by [Diataxis](https://diataxis.fr) document type: - [`docs/README.md`](docs/README.md) โ€” index and routing. - [`docs/glossary.md`](docs/glossary.md) โ€” domain terms (COINs, MultiProxAn, query structures, SSE, inference lock, โ€ฆ). - [`docs/explanation/`](docs/explanation/) โ€” architecture, research methods, inference lifecycle. - [`docs/reference/`](docs/reference/) โ€” API, SSE protocol, backend services, frontend modules. - [`docs/guides/`](docs/guides/) โ€” local development, deployment. - [`docs/api.yaml`](docs/api.yaml) โ€” OpenAPI 3.0.3 source of truth for the REST API. - [`docs/postman/`](docs/postman/) โ€” Postman collection and environment for hand-testing. The Django backend has its own README at [`src/backend/README.md`](src/backend/README.md) and the Vue SPA at [`src/frontend/README.md`](src/frontend/README.md). Both link back to `docs/` for the deeper material. ## Deploying `git push hf master:main` to the Space remote. See [`docs/guides/deploy.md`](docs/guides/deploy.md) for the full procedure (Space secrets, checkpoint refresh on HF Hub, rollback, persistent storage option). ## License MIT for the website code. The PhD thesis and individual research methods retain their original publication terms; see the thesis PDF.