Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better BPINN Log Posterior formulation and Experiments #799

Closed
wants to merge 0 commits into from

Conversation

AstitvaAggarwal
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Uses extra loss term

@AstitvaAggarwal AstitvaAggarwal changed the title Better Log Posterior formulation for BPINN PDE Solver Better Log Posterior formulation for BPINN Solvers Feb 3, 2024
@AstitvaAggarwal
Copy link
Contributor Author

@ChrisRackauckas, @Vaibhavdixit02 this has code for both PDE and ODE case over Master Branch.

@AstitvaAggarwal AstitvaAggarwal changed the title Better Log Posterior formulation for BPINN Solvers Better BPINN Log Posterior formulation and Experiments Feb 3, 2024
@ChrisRackauckas
Copy link
Member

What do you mean?

There's some conflicts here.

@AstitvaAggarwal
Copy link
Contributor Author

the extra loss funciton in case of the ODE solver and PDE solver, im still working on the PDE solver case. Ill fix the conflicts as im currently focusing on this pr

src/PDE_BPINN.jl Outdated Show resolved Hide resolved
src/PDE_BPINN.jl Outdated Show resolved Hide resolved
eq_args = NeuralPDE.get_argument(eqs, dict_indvars, dict_depvars)
# [[:t]]

points = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type it or create with comprehension


points = []
for eq_arg in eq_args
a = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@Vaibhavdixit02
Copy link
Member

I think broadly this looks good already. Do you have any results for comparison of the new likelihood?

@ChrisRackauckas
Copy link
Member

Agreed I look at this and it seems ready-ish to merge. What's the status here?

@AstitvaAggarwal
Copy link
Contributor Author

Im still running experiments, I've managed to get one test set pass for the new implementation but that's a simple example, the Lorentz equations example fails as I still need to tune the training process better. Overall im working on the new test problems

@Vaibhavdixit02
Copy link
Member

Vaibhavdixit02 commented Feb 19, 2024

Okay sounds good. What do you mean by failing for the Lorenz one, how does it fail? Also Lorenz is way too hard to be the test problem, use the LV instead

@AstitvaAggarwal
Copy link
Contributor Author

AstitvaAggarwal commented Feb 20, 2024

I mean the estimated parameters are not within tolerated error bounds, ive not been able to get HMC or NUTS reduce the Hamiltonian energy enough in all the runs till now. Yeah, will try the same for KS and LV now

@ChrisRackauckas
Copy link
Member

You may want to rebase to master so it should go faster.

@AstitvaAggarwal
Copy link
Contributor Author

AstitvaAggarwal commented Mar 26, 2024

@ChrisRackauckas i apologise for the delayed PR, ive been testing the implementation thoroughly hence the delay(single solve takes 1.5-2hrs). ive shared results uptil now with @Vaibhavdixit02. The results are positive but not significant enough, this is for the LV case as the PDE residual loss is misleading (allows zero gradients trivial solution for inverse problem setting). this PR involves the new loss implementation, some tests, and a correction to the existing PDE BPINN solver(was hidden in the details of the Domain point generation function present in the normal PINN solver). I will add more tests in a seperate PR.

@AstitvaAggarwal
Copy link
Contributor Author

AstitvaAggarwal commented Mar 26, 2024

For your reference:
green and pink curve for new implementation(sol5_2), blue and brown for old implementation(sol3)

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants