Training and Predicting with Model Committees¶
This tutorial describes how training and prediction in RuNNer 2 can be extended to incorporate committees (ensembles of neural networks) for improved robustness and uncertainty estimation.
What is a committee?
A committee (or ensemble) consists of multiple machine learning models tha share the same input features but may differ in:
- Network architecture
- Initial random seeds
- Optimizer settings
- Training hyperparameters
- Train/test splits
When predicting the same structure, the disagreement between committee members provides a practical estimate of the model uncertainty. This is particularly useful in active learning workflows and reliability assessment.
Committee Training¶
RuNNer supports training multiple committee members simultaneously within a single run.
Because all committee members share the feature calculation, they must also share:
- The same dataset
- The same feature definitions
- The same train/test split
RuNNer supports training a committee of models all at once. However, because all committee members share the feature calculation, the train / test split has to be identical for all members.
Committees with different train/test splits
It is fully supported to use committee members trained with different train/test splits during prediction. In this case, train each model independently and only unify them in the prediction stage.
Most output files generated during training are written into automatically created subdirectories. The folder structure will look like this:
PATH/
├── input.nn
├── scaling.data
├── 1/
│ ├── weights_short.001.data
│ └── weights_short.008.data
├── 2/
│ ├── weights_short.001.data
│ └── weights_short.008.data
├── .../ (other committee folders)
└── n/
├── weights_short.001.data
└── weights_short.008.data
Each directory corresponds to one committee member. Notice how the scaling.data
file is written to the root directory of the calculation, since features are
shared between committee members.
Warning
If directories such as 1/, 2/, 3/ already exist from previous training runs, output files may be overwritten.
Ensure you archive or rename previous results before starting a new committee training.
Prerequisites¶
This tutorial assumes you already have a working single-network training setup.
If not, please start with the 2G tutorial before proceeding.
Input¶
Compared to standard (non-committee) training, only minimal modifications to input.nn are required.
Most importantly we have to specify the number of committee members we want to use
with num_committee_members:
num_committee_members 4
This instructs RuNNer to train four neural networks simultaneously using identical architecture and training settings.
Random Seed Behavior¶
If you provide a single random_seed, it is used to
* initialize the train/test split
* initialize the first committee member
* deterministically generate random seeds for all remaining committee members
See the random_seed documentation for further details.
Output¶
Because multiple networks are trained at once, the STDOUT printed by
RuNNer expands to show metrics for each member.
--------------------------------------------------------------------------------
Energy [meV / atom] Forces [meV / Bohr]
Epoch Comm. Train Test Train Test
--------------------------------------------------------------------------------
RMSE 0 1 38.6582 38.3892 852.3961 841.6591
RMSE 0 2 49.2045 48.4677 843.5274 831.3026
RMSE 0 3 44.9147 43.9323 843.8901 833.0362
RMSE 0 4 45.7725 44.6303 868.3146 859.4484
--------------------------------------------------------------------------------
RMSE 1 1 5.7112 5.1176 272.8571 273.1953
RMSE 1 2 6.3356 8.2201 275.7252 276.8911
RMSE 1 3 5.5069 6.1090 240.5982 239.7464
RMSE 1 4 3.7931 4.0558 230.8009 233.2068
UPDATES 1 1 126 449
UPDATES 1 2 126 508
UPDATES 1 3 126 436
UPDATES 1 4 126 385
TIMING 1 1.34 min
--------------------------------------------------------------------------------
RMSE 2 1 2.7352 3.1993 93.7605 94.9482
RMSE 2 2 1.8484 1.6521 102.5449 106.3166
RMSE 2 3 2.3983 2.9835 96.2037 95.7769
RMSE 2 4 2.0704 2.0341 95.0648 93.9810
UPDATES 2 1 126 367
UPDATES 2 2 126 351
UPDATES 2 3 126 491
UPDATES 2 4 126 891
TIMING 2 1.36 min
--------------------------------------------------------------------------------
In each epoch there are now RMSE and UPDATES lines for each committee member, allowing you to monitor the state of the training individually.
All standard output files (e.g., weights_short.XXX.data) are written exactly
as in single-network training, but placed in the respective committee subdirectory (1/, 2/, 3/, ...).
Advanced committee options¶
Committee members can be customized individually using the _comm suffix for keywords
in input.nn.
Random Seeds per Member¶
You may explicitly define one random seed per committee member:
random_seed 4 8 15 16
The first seed is used to initialize the train / test split.
Note
The number of provided seeds must match num_committee_members.
Architecture Variations¶
The networks architecture can be varied between committee members using
node_short_comm 1 C 10 10
node_short_comm 2 C 15 15
The same can be done for the activations:
activation_nn_comm C 1 t t l
activation_nn_comm C 2 s s l
Tip
Introducing architectural diversity often increases committee disagreement and can improve uncertainty estimation.
Fixed parameters¶
Parameters can be fixed and excluded from training. Here as an example for the first committee member.
fix_weights_comm H 1 2 20
fix_biases_comm H 1 2 20
Further documentation can be found in the keyword documentations for fix_weights and fix_biases.
Optimizers¶
Optimizers can be changed between committee members. This is especially useful for fine-tuning of the optimizer settings by training a committee with slightly different optimizer settings.
optimizer 1 1 kalman p_initial=1.0
optimizer 1 2 kalman p_initial=10.0
optimizer 1 3 kalman nue=0.98
optimizer 1 4 kalman nue=0.99
Committee Prediction¶
Committee prediction shares the feature calculation for all committee members. This makes it faster than running all members seperately.
For a successful prediction run, all dataset and feature-related files (input.nn, input.data, scaling.data) must be located in your root directory.
Committee-specific input files (e.g., the optimized weights.XXX.data files) must be located in their respective 1/, 2/, 3/ folders.
Warning
All committee members must be compatible with the same feature definition and scaling. Mixing incompatible feature setups will result in incorrect predictions.
Input¶
As in training, you only need to specify:
num_committee_members 4
If you used additional committee-specific settings during training (like node_comm or activation_nn_comm), reuse those exact keywords in your prediction setup.
Summary
Using committees in RuNNer 2 allows you to:
- Improve robustness of predictions
- Estimate model uncertainty via committee disagreement
- Explore architectural and optimizer diversity
- Perform efficient ensemble prediction with shared feature calculation
Committees are especially recommended for:
- Active learning workflows
- Large-scale screening
- Applications where uncertainty estimation is critical