image thumbnail

Knowledge Based Neural Networks

version 1.0.6 (4.96 KB) by Nick Pepper
Demonstration code for a Knowledge Based Neural Network (KBaNN), a bi-fidelity machine learning architecture


Updated 14 Jul 2021

View License

Knowledge Based Neural Networks are a bi-fidelity machine learning architecture that allow the outputs of a coarse scale model, , to be augmented by the predictions of a neural network. Having been trained using a dataset comprising outputs of a high-fidelity model, Fe(x), the KBaNN corrects the outputs of the coarse model to emulate the output of . The architecture is based on the KBaNN proposed in Wang et al (1997) but adapted for bi-fidelity modelling. The formalism has also been modified to produce an additive rather than multiplicative correction to . It also now incorporates regularisation.
The KBaNN formulation attempots to leverage the flexibility and scalability of neural networks, while addressing the criticism that they are data-driven black boxes by incorporating the coarse model.
The attached code demonstrates the KBaNN architecture for the Forrester problem. The main file is "forrester_test_main".
Please do provide us with feedback on the code, we are happy to engage to improve it!
Mathematical details may be found in Pepper, Gaymann, Montomoli, and Sharma, "Local bi-fidelity field approximation with Knowledge Based Neural Networks for Computational Fluid Dynamics" (2021). DoI:

Cite As

Nick Pepper (2022). Knowledge Based Neural Networks (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!