github-actions[bot] commited on
Commit
0067feb
Β·
1 Parent(s): cc75fc7

swap README for HF

Browse files
Files changed (1) hide show
  1. README.md +9 -71
README.md CHANGED
@@ -1,71 +1,9 @@
1
- # KdV PINN
2
-
3
- [![Post](https://img.shields.io/badge/πŸ“-Read_the_Post-blue)](https://angerami.github.io/posts/2026/kdv-pinn/)
4
- [![Demo](https://img.shields.io/badge/πŸ“Š-Interactive_Demo-orange)](https://huggingface.co/spaces/angerami/kdv-pinn)
5
-
6
- Physics-informed neural network for the Korteweg–de Vries equation, with boundary conditions specified through the inverse scattering transform rather than conventional Dirichlet/Neumann conditions. The KdV equation's integrability provides a rich validation framework: an infinite hierarchy of conservation laws serves as unsupervised diagnostics independent of the training loss, and the spectral structure of the associated Lax pair (isospectrality, eigenfunction dynamics) can be extracted and verified directly from the learned solution.
7
-
8
- ## Overview
9
-
10
- - **`scattering.py`** β€” Inverse scattering transform: constructs exact N-soliton solutions from scattering data via the Marchenko matrix and Ο„-function formulations. Also solves the SchrΓΆdinger eigenvalue problem to extract spectral data from arbitrary potentials.
11
- - **`physics.py`** β€” KdV operator and conservation hierarchy. Computes the PDE residual and conserved densities/fluxes (mass, momentum, energy, and higher) via autograd.
12
- - **`train.py`** β€” Two-phase training: supervised pretraining against the analytic solution to select the correct topological sector, followed by physics-informed fine-tuning using the KdV residual.
13
- - **`validation.py`** β€” End-to-end validation pipeline: trains, evaluates conservation law residuals, and runs inverse scattering to verify isospectra lity.
14
- - **`parameter_sweep.py`** β€” Sweeps over soliton number, ΞΊ values, and initial positions.
15
-
16
- The [interactive demo](https://huggingface.co/spaces/angerami/kdv-pinn) computes analytic N-soliton solutions on the fly and displays the potential, eigenfunctions, and recovered eigenvalues. See the [writeup](https://angerami.github.io/posts/2026/kdv-pinn/) for background and results.
17
-
18
- ## Project Structure
19
- ```
20
- kdv-pinn/
21
- β”œβ”€β”€ .github
22
- β”‚ └── workflows
23
- β”‚ └── sync_to_hf.yml
24
- β”œβ”€β”€ .gitignore
25
- β”œβ”€β”€ apps
26
- β”‚ └── streamlit_app.py
27
- β”œβ”€β”€ configuration.py
28
- β”œβ”€β”€ Dockerfile
29
- β”œβ”€β”€ equations.md
30
- β”œβ”€β”€ HF_README.md
31
- β”œβ”€β”€ models.py
32
- β”œβ”€β”€ notebooks
33
- β”‚ β”œβ”€β”€ analytic_solutions.ipynb
34
- β”‚ β”œβ”€β”€ example_kdv_slices.ipynb
35
- β”‚ └── kdv_pinn.ipynb
36
- β”œβ”€β”€ parameter_sweep.py
37
- β”œβ”€β”€ physics.py
38
- β”œβ”€β”€ plot_utils.py
39
- β”œβ”€β”€ README.md
40
- β”œβ”€β”€ requirements.txt
41
- β”œβ”€β”€ run_training.py
42
- β”œβ”€β”€ sampling.py
43
- β”œβ”€β”€ scattering.py
44
- β”œβ”€β”€ train.py
45
- └── validation.py
46
- ```
47
-
48
- ## Quick Start
49
-
50
- ### Training
51
- ```bash
52
- # Train with default configuration
53
- python train.py
54
-
55
- # Train with custom epochs
56
- python train.py --epochs 5000
57
-
58
- # Run full validation
59
- python validation.py
60
- ```
61
-
62
- ### Interactive Application
63
- ```bash
64
- # Launch Streamlit app for exploring N-soliton solutions
65
- streamlit run apps/streamlit_app.py
66
- ```
67
-
68
- ### Notebooks
69
- ```bash
70
- jupyter notebook notebooks/kdv_pinn.ipynb
71
- ```
 
1
+ ---
2
+ title: KdV PINN
3
+ emoji: 🌊
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---