| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
SetONet is a DeepONet-class neural operator that learns mappings between function spaces while removing key limitations of standard DeepONet. Beyond the need for fixed sensor locations, standard DeepONet cannot natively accept unordered, variable-length, unstructured inputs such as point-cloud measurements. SetONet modifies DeepONet’s branch network to process inputs as an unordered set of location–value pairs and incorporates Deep Sets principles to guarantee permutation invariance. It preserves the same trunk network and overall synthesis as DeepONet and, importantly, maintains the same number of trainable parameters—acting as a drop-in replacement without increasing model complexity.
This repository provides SetONet and baseline DeepONet implementations, dataset generators/loaders, benchmark run scripts, evaluation and plotting utilities, and logging tooling. For more details, see the paper: https://arxiv.org/abs/2505.04738
Requirements: Python 3.9+ and a CUDA-enabled GPU (CPU works but is slow).
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python - << 'PY'
import torch
print('CUDA available:', torch.cuda.is_available())
print('CUDA device:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU')
PY
python Benchmarks/run_SetONet/run_heat_2d.py \ --device cuda:0 \ --data_path Data/heat_data/pcb_heat_adaptive_dataset9.0_n8192_N25_P10
TensorBoard logs and figures are written under logs/.
SetONet uses HuggingFace datasets-style on-disk datasets. Each benchmark has a generator and loader.
| Benchmark | Generator | Loader | Run Script |
|---|---|---|---|
| Heat 2D (point sources) | Data/heat_data/generate_heat_2d_data.py | Data/heat_data/heat_2d_dataset.py | Benchmarks/run_SetONet/run_heat_2d.py |
| Elastic Plate 2D | Data/elastic_2d_data/get_elastic_data.py | Data/elastic_2d_data/elastic_2d_dataset.py | Benchmarks/run_SetONet/run_elastic_2d.py |
| Optimal Transport 2D | Data/transport_data/generate_transport_data.py | Data/transport_data/transport_dataset.py | Benchmarks/run_SetONet/run_transoprt.py |
| Concentration 2D (advection–diffusion) | Data/concentration_data/generate_concentration_2d_data.py | Data/concentration_data/concentration_2d_dataset.py | Benchmarks/run_SetONet/run_consantration_2d.py |
| Darcy 1D | Data/darcy_1d_data/darcy_1d_data.py | Data/darcy_1d_data/darcy_1d_dataset.py | Benchmarks/run_SetONet/run_darcy_1d.py |
| Chladni 2D | Data/chladni_data/chladni_plate_generator.py | Data/chladni_data/chladni_2d_dataset.py | Benchmarks/run_SetONet/run_chladni_2d.py |
| Dynamic Chladni | Data/dynamic_chladni/dynamic_chladni_generator.py | Data/dynamic_chladni/dynamic_chladni_dataset.py | Benchmarks/run_SetONet/run_dynamic_chladni.py |
| 1D Calculus Operators | Data/synthetic_1d_data.py | (inline sampling) | Benchmarks/run_SetONet/run_1d.py |
Quick tips:
Each SetONet run script follows the same pattern:
python Benchmarks/run_SetONet/<script>.py [--flags]
Examples:
python Benchmarks/run_SetONet/run_heat_2d.py \ --device cuda:0 \ --data_path Data/heat_data/pcb_heat_adaptive_dataset9.0_n8192_N25_P10 \ --son_p_dim 128 --son_phi_hidden 256 --son_rho_hidden 256 \ --son_trunk_hidden 256 --son_n_trunk_layers 4 \ --son_phi_output_size 32 --son_aggregation attention \ --pos_encoding_type sinusoidal --pos_encoding_dim 64 --pos_encoding_max_freq 0.01 \ --son_lr 5e-4 --son_epochs 50000 --batch_size 32
python Benchmarks/run_SetONet/run_elastic_2d.py \ --device cuda:0 \ --son_p_dim 128 --son_phi_hidden 256 --son_rho_hidden 256 \ --son_trunk_hidden 256 --son_n_trunk_layers 4 \ --son_phi_output_size 32 --son_aggregation attention \ --pos_encoding_type sinusoidal --pos_encoding_dim 64 --pos_encoding_max_freq 0.1 \ --son_lr 5e-4 --son_epochs 125000 --batch_size 64 \ --train_sensor_dropoff 0.0 --eval_sensor_dropoff 0.0
python Benchmarks/run_SetONet/run_transoprt.py \ --device cuda:0 \ --data_path Data/transport_data/transport_dataset \ --mode velocity_field \ --son_p_dim 128 --son_phi_hidden 256 --son_rho_hidden 256 \ --son_trunk_hidden 256 --son_n_trunk_layers 4 \ --son_phi_output_size 32 --son_aggregation attention \ --pos_encoding_type sinusoidal --pos_encoding_dim 64 --pos_encoding_max_freq 0.01 \ --son_lr 5e-4 --son_epochs 50000 --batch_size 32
DeepONet baselines:
python Benchmarks/run_DeepONet/run_elastic_2d_don.py --device cuda:0 python Benchmarks/run_DeepONet/run_1d_don.py --device cuda:0
Evaluation is performed automatically at the end of training; periodic eval is logged via TensorBoard if enabled. Results (MSE, relative L2) and plots are stored in logs/<model>/<timestamp>/.
Each run script can save sample figures. You can also directly call plotting utilities:
TensorBoard:
tensorboard --logdir logs
Key SetONet hyperparameters (also CLI flags):
Elastic-only robustness flags (also work for some 1D/2D problems with 2D sensors):
Issues/PRs that include: repro steps, commands, dataset parameters, and environment details help a lot.
If you find this repository useful in your research, please cite our paper:
@article{tretiakov2025setonet,
title = {SetONet: A Set-Based Operator Network for Solving PDEs with Variable-Input Sampling},
author = {Tretiakov, Stepan and Li, Xingjian and Kumar, Krishna},
year = {2025},
eprint = {2505.04738},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
doi = {10.48550/arXiv.2505.04738},
url = {https://arxiv.org/abs/2505.04738}
}| Back | FazBrowse Home | New Git URL |