GSoC '25 Project: Implement a Wishlist Model - Hamiltonian Neural Network

Hello DeepChem Community

I’m Abhay, recent graduate student ( branch-IT ) from Mumbai, India. I am happy to share that I will be working on Implementing Hamiltonian Neural Network (HNN) for my GSoc 25 project.

Throughout the summer, I’ll share weekly updates on the project’s progress and would love to get feedback or suggestions from the community.

Regards,
Abhay Shinde

Week 1 :-

  • This week started with understanding the basic maths which is included in the research paper, to get an basic understanding of how things works behind the scenes ( hamiltonian mechanics ), so started doing numericals on paper. [ Link to pdf ]

  • Then implemented the same maths with pytorch ( for gradients ). [ notebook link ]

  • The author of paper has provided python scripts to generate synthetic data for each experiments mentioned in paper (scritps), so tried to understand by passing some demo data. [ notebook link ]

  • Also at the first page of paper itself, author compared a simple MLP/NN with HNN to see how HNN outperforms vanilla neural networks to conserve the physical systems, so created a colab notebook which compares this two in brief on mass-spring experiment. [ notebook link ]

Slides deck -> Link

Week 2 :-

  • Worked on base HNN class which includes methods/functions to created MLP, forward method, calculating loss, hamiltonian function. [ Link ]

  • Tested this class on experiments mentioned in the paper ( got good results )
    Mass Spring experiment -> [ Link ]
    Pendulum experiment -> [ Link ]

Week 3 :-

  • Created a wrapper for base class which follows the deepchem TorchModel functionality [ Link ] , also added docstrings and type annotations
  • Tested wrapper for experiments :- [experiment1], [experiment2]
  • Created a draft PR for review on the base layer and wrapper class [PR link]