Skip to content

Conversation

@JaehwanJeon
Copy link

@JaehwanJeon JaehwanJeon commented Oct 11, 2025

[Add SVI trainer for Bayesian neural networks]

Provide a general summary of your changes in the Title above

Description

  1. Developed SVITrainer to enable generic SVI (src/UQpy/scientific_machine_learning/trainers/SVITrainer.py).

Related Issue

This project only accepts pull requests related to open issues
If suggesting a new feature or change, please discuss it in an issue first
If fixing a bug, there should be an issue describing it with steps to reproduce
Please link to the issue here: [https://github.com//issues/273]

Motivation and Context

The existing Bayes-by-backprop trainer in UQpy is tightly coupled to its custom mean-field implementation, which makes it hard to experiment SVI which allows us to handle aleatoric uncertainty. This PR introduces a SVI trainer that accepts Bayesian neural networks built with UQpy can be used to update inherent randomness.

How Has This Been Tested?

  • Executed "docs/code/scientific_machine_learning/bbb_trainer/svitrainer_trig_sigma.py" to deal with trainable sigma.

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (if appropriate):

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@JaehwanJeon JaehwanJeon changed the title general SVI methods for Bayesian neural networks using Pyro general SVI methods for Bayesian neural networks Nov 1, 2025
@JaehwanJeon JaehwanJeon changed the title general SVI methods for Bayesian neural networks SVI methods for Bayesian neural networks to deal with trainable sigma Nov 1, 2025
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.

1 participant