PINA v0.3 Release Notes
Highlights
We are thrilled to announce version 0.3 of the PINA library. This major release introduces a comprehensive refactoring of the internal architecture, new model families, enhanced solver flexibility, and an expanded collection of problems, while preserving backward compatibility with version 0.2.
In this release, the internal codebase has been redesigned around the _src pattern, with clear interfaces and base classes introduced across all major modules. This architectural overhaul improves maintainability, extensibility, and code readability.
Version 0.3 also introduces support for Kolmogorov-Arnold Networks (KANs), a new mixin-based solver architecture, and a fully revamped condition system. In particular, evaluation logic is now decoupled from solvers, enabling more modular and solver-agnostic workflows. The release also adds new conditions and solvers for autoregressive training, extending PINA’s capabilities for temporal data modeling.
A detailed overview of the updates introduced in this version is provided in the following section.
New Features and Updates
Solver Architecture: Mixin-Based Design
The solver module has been fully redesigned around a mixin-based architecture. Instead of relying on monolithic solver classes, PINA now provides lightweight, single-responsibility mixins that can be freely combined to define different training strategies:
- AutoregressiveMixin — enables autoregressive sequential prediction
- ConditionAggregatorMixin — aggregates loss contributions across conditions
- EnsembleMixin — supports ensemble of models
- GradientEnhancedMixin — adds gradient-enhanced training
- ManualOptimizationMixin — provides fine-grained control over optimization steps
- MultiModelMixin — enables multi-model configurations
- PhysicsInformedMixin — injects physics-informed loss computation
- ResidualBasedAttentionMixin — implements residual-based attention mechanisms
- SingleModelMixin — standard single-model training loop
This new architecture introduces specialized solver classes including:
- AutoregressiveSingleModelSolver and AutoregressiveEnsembleSolver — for sequential time-series prediction tasks with adaptive step weighting
- PhysicsInformedSingleModelSolver and PhysicsInformedEnsembleSolver — for standard PINN training
- SupervisedSingleModelSolver and SupervisedEnsembleSolver — for data-driven supervised learning
- CausalPhysicsInformedSingleModelSolver — implements causal training for time-dependent PDEs
- CompetitivePhysicsInformedSolver — adversarial training between model and residual losses
- GradientPhysicsInformedSingleModelSolver — gradient-enhanced PINN training
- SelfAdaptivePhysicsInformedSolver — self-adaptive loss balancing
- RBAPhysicsInformedSingleModelSolver — residual-based attention PINN
- MultiModelSolver — supports multiple models jointly trained
Ensemble variants are also available for the corresponding ensemble-compatible solvers.
Conditions Refactoring: Decoupled Evaluation
The condition system has been fundamentally redesigned. Evaluation logic has been moved out of the solver and into the condition itself via a dedicated evaluate method, decoupling the training loop from problem-specific logic. New condition types include:
- DataCondition — for data-fitting constraints
- DomainEquationCondition — for PDE constraints over domains
- InputEquationCondition — for PDE constraints from input data
- InputTargetCondition — for input-output supervised pairs
- TimeSeriesCondition — for autoregressive time-series data
- GraphTimeSeriesCondition — for graph-based time-series autoregression
Weighting Module
A dedicated weighting module has been introduced, separating loss weighting strategies from the loss computation itself:
- NoWeighting — uniform weighting
- LinearWeighting — learnable linear weights
- ScalarWeighting — fixed scalar weighting
- SelfAdaptiveWeighting — gradient-norm-based adaptive weighting
- NTKWeighting — Neural Tangent Kernel-based weighting
Loss Module
The loss module has been redesigned around a clearer interface and base abstractions. Existing loss formulations have been reorganized under the new structure, while the main new addition in this release is:
- SinkhornLoss — Sinkhorn divergence-based loss
New Models
- Kolmogorov-Arnold Networks (KAN) - PINA v0.3 introduces support for Kolmogorov-Arnold Networks, a novel neural network architecture based on the Kolmogorov-Arnold representation theorem. The
KolmogorovArnoldNetworkclass provides a stack ofKANBlockmodules, each applying learnable spline-based transformations to the input, optionally combined with a base activation function. The implementation includes fully vectorized spline basis functions with analytical derivatives, making KANs suitable for physics-informed applications where gradient computation is essential.
Equation Zoo
The equation zoo has been reorganized into an independent module. Previously, these equations were defined in the equation_factory.py file. In version 0.3, they have been moved to a dedicated module, improving code organization, discoverability, and extensibility. The equation zoo now includes:
- BurgersEquation — 1D Burgers' equation
- AdvectionEquation — advection equation
- AcousticWaveEquation — acoustic wave equation
- AllenCahnEquation — Allen-Cahn equation
- DiffusionReactionEquation — diffusion-reaction equation
- HelmholtzEquation — Helmholtz equation
- PoissonEquation — Poisson equation
- FixedValue, FixedGradient, FixedLaplacian, FixedFlux — boundary condition equations
Problem Collection
Version 0.3 significantly expands the problem zoo with modular implementations of common physical problems:
- BurgersProblem — 1D Burgers' equation problem
- AdvectionProblem — advection operator learning problem
- AcousticWaveProblem — acoustic wave propagation problem
- AllenCahnProblem — Allen-Cahn equation problem
- DiffusionReactionProblem — diffusion-reaction problem
- HelmholtzProblem — Helmholtz equation problem
- PoissonProblem — Poisson equation problem
- InversePoissonProblem — inverse Poisson identification problem
Data Module Enhancements
The DataModule (formerly PinaDataModule) has been further refined with improved internal structure:
- Creator — handles dataset creation from conditions
- Aggregator — aggregates batched data from multiple conditions
- ConditionSubset — manages per-condition data subsets
- DataManager interface with TensorDataManager and GraphDataManager implementations
- BatchManager — coordinates batching strategies
- SingleBatchDataLoader — optimized single-batch data loading
Internal Backward Compatibility
Version 0.3 maintains backward compatibility with version 0.2 through deprecation warnings. The renamed modules and moved classes provide a smooth migration path for existing codebases.
Conclusion
With version 0.3, PINA becomes an even more powerful and flexible framework for Scientific Machine Learning. The new mixin-based solver architecture, support for KANs, expanded problem zoo, and comprehensive internal refactoring provide users with greater flexibility, improved code organization, and enhanced capabilities for both research and production applications. PINA team sincerely thanks its community for the invaluable feedback and contributions that made this release possible. We look forward to introducing more enhancements in the near future!