This repository contains the code, results, and documentation for my thesis project, which explores the role of Fibonacci sequence-based activation functions in Physics-Informed Neural Networks (PINNs). The project demonstrates the effectiveness of the proposed activation function compared to traditional ones like tanh and sigmoid across various physics problems.
Physics-Informed Neural Networks (PINNs) have emerged as a powerful tool for solving complex differential equations. This thesis investigates the impact of activation functions on PINN performance, specifically focusing on a novel activation function inspired by the Fibonacci sequence. We compare its performance with traditional tanh and sigmoid functions across five diverse physics problems, showcasing its potential to enhance accuracy and convergence.
-
Fibonacci_PINNs.ipynb
: The main Jupyter Notebook containing all code for training and evaluating PINN models.- Section 1: Training and evaluation with tanh and sigmoid activations on all five equations.
- Section 2: Training and evaluation with the proposed Fibonacci-based activation on all five equations.
-
results/
: Generated plot images for each problem and activation function -
docs/
thesis.pdf
: Complete thesis reportpresentation
: Slides used for thesis defense. Find it here Canva Pptreference papers
: Some of the paper used as references for the projectcertificate.pdf
: Completion certificate
-
latex/
thesis.zip
: LaTeX source code for the thesis document
-
README.md
: This file
-
Clone the repository:
git clone https://github.com/astromanish/fibonacci-PINNs.git cd fibonacci-PINNs
-
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
Typical dependencies might include:
- tensorflow or pytorch
- numpy
- matplotlib
- deepxde
- jupyter
All code is contained in a single Jupyter Notebook, making it easy to run and experiment with different settings.
-
Start Jupyter Notebook:
jupyter notebook
-
Open
Fibonacci_PINNs.ipynb
in your browser. -
Run the cells in order:
- First section: Models with tanh and sigmoid activations
- Second section: Models with the proposed Fibonacci-based activation
-
Experiment by modifying hyperparameters, network architectures, or even the activation functions themselves.
-
Results (plots) will be saved in the
results/
directory.
The notebook addresses five diverse physics problems:
- 1D Poisson Equation
- 1D Burgers' Equation
- Time-Dependent 1D Heat Equation
- 2D Helmholtz Equation
- 2D Elastostatic Problem
Each problem is solved using three different activation functions:
- Hyperbolic Tangent (tanh)
- Sigmoid
- Proposed Fibonacci-based activation
The results/
directory contains visualizations comparing the performance of each activation function for each problem. Key findings show that the Fibonacci-based activation function:
- Accelerates convergence in most cases
- Provides higher accuracy, especially in complex scenarios
- Shows robustness across various physics domains
For detailed analysis and discussion, please refer to the thesis report.
The complete thesis is available as docs/thesis.pdf
. Its LaTeX source code is provided in latex/thesis.zip
for those interested in the document structure or wishing to build it themselves.
This repository is for a completed thesis project, so new contributions aren't expected. However, if you find bugs or have suggestions for future work, please open an issue.
Manish Singh - manish.singh.mat19@itbhu.ac.in
- Thesis Advisor: Dr. Rajeev
- Indian Institute of Technology (BHU) VARANASI for computational resources
- Open-source community behind TensorFlow/PyTorch and other libraries
To ensure reproducibility, the notebook includes:
- Random seed settings
- Detailed hyperparameter configurations
- Clear explanation of the Fibonacci-based activation function
Feel free to reach out if you have questions or need help reproducing the results.