Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [1] § Proposed method › Machine learning model architecture ↔ USEM.py, lines 93 to 135 · score 0.76 · hidden layers, Spectral normalization, Strides, padding, filters, ReLU · block
oscr:b:33HKTB3RK8AY6-W· Report a mismatch - [2] § Technological background › Spectral-normalized Neural Gaussian Process (SNGP) ↔ USEM.py, lines 93 to 135 · score 0.62 · hidden representation, hidden layer, spectral, bounding, residual, dimensionality · block
oscr:b:33HKTB3RK8AY6-W· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 248 lines · 8.4 KB · no license · 2 matches
- import os
- import adapt
- import numpy as np
- import pandas as pd
- import tensorflow as tf
- import matplotlib.pyplot as plt
- import numpy as np
- from sklearn.preprocessing import OneHotEncoder
- from sklearn.decomposition import PCA
- from sklearn.manifold import TSNE
- from sklearn.metrics import accuracy_score, top_k_accuracy_score
- from sklearn.datasets import make_moons
- from tensorflow.keras import Model, Sequential
- from tensorflow.keras.optimizers.legacy import Adam, SGD, RMSprop, Adagrad
- from tensorflow.keras.layers import Dense, Input, Dropout, Conv2D, MaxPooling2D, GlobalMaxPooling2D, Flatten, Reshape, GaussianNoise, BatchNormalization
- from tensorflow.keras.constraints import MinMaxNorm
- from tensorflow.keras.regularizers import l2
- from adapt.feature_based import DANN, ADDA, DeepCORAL, CORAL, MCD, MDD, WDGRL, CDAN
- import glob
- #%% data
- # simulation data
- data = []
- filename = []
- path = '.../Metals 03182024/'
- for file_name in glob.glob(path+'*.csv'):
- x = pd.read_csv(file_name)
- data.append(x.values.tolist())
- filename.append(file_name[44:-4])
- loaded_images = np.array(data)
- crystal_system = [x[:3] for x in filename]
- crystal_system_label = (np.array(crystal_system)=='BCC')*0 + (np.array(crystal_system)=='FCC')*1 + (np.array(crystal_system)=='HCP')*2
- for i in range(1):
- plt.imshow(loaded_images_resized[i], cmap=plt.cm.jet)
- plt.colorbar()
- plt.show()
- import cv2
- resize_scale = 10
- loaded_images_resized = np.zeros((loaded_images.shape[0], round(loaded_images.shape[1] / resize_scale), round(loaded_images.shape[2] / resize_scale)))
- for i in range(len(loaded_images)):
- loaded_images_resized[i] = cv2.resize(np.array(loaded_images[i], dtype='uint8'), (round(loaded_images.shape[2] / resize_scale), round(loaded_images.shape[1] / resize_scale)), interpolation=cv2.INTER_AREA)
- Xs = np.repeat(loaded_images_resized[:, :, :, np.newaxis], 1, axis=3)
- Xs = Xs/np.max(Xs)
- ys = crystal_system_label
- # synthetic data
- # noise
- noise = np.random.normal(0, 1, loaded_images.shape)
- loaded_images_noised = loaded_images + noise
- loaded_images_noised_resized = np.zeros((loaded_images.shape[0], round(loaded_images.shape[1] / resize_scale), round(loaded_images.shape[2] / resize_scale)))
- for i in range(len(loaded_images)):
- loaded_images_noised_resized[i] = cv2.resize(np.array(loaded_images_noised[i], dtype='uint8'), (round(loaded_images.shape[2] / resize_scale), round(loaded_images.shape[1] / resize_scale)), interpolation=cv2.INTER_AREA)
- Xt = np.repeat(loaded_images_noised_resized[:, :, :, np.newaxis], 1, axis=3)
- Xt = Xt/np.max(Xt)
- yt = ys
- from sklearn.preprocessing import OneHotEncoder
- one = OneHotEncoder(sparse_output=False)
- one.fit(np.array(ys).reshape(-1, 1))
- ys_lab = one.transform(np.array(ys).reshape(-1, 1))
- yt_lab = one.transform(np.array(yt).reshape(-1, 1))
- #%% Discriminator
- def get_discriminator():
- model = Sequential()
- model.add(Dense(10, activation='relu'))
- model.add(Dense(10, activation='relu'))
- model.add(Dense(1, activation="sigmoid"))
- # model.compile(optimizer=Adam(0.001), loss='mse')
- return model
- #%% Encoder
- class DeepResNet(tf.keras.Model):
- """Defines a multi-layer residual network."""
- def __init__(self, num_classes, kernel_size=2, num_conv2d_layers=3, num_dense_layers=3,
- num_conv2d_hidden=64, num_dense_hidden=64, dropout_rate=0.1, spec_norm_bound=0.9, **classifier_kwargs):
- super().__init__()
- # Defines class meta data.
- self.kernel_size = kernel_size
- self.num_conv2d_hidden = num_conv2d_hidden
- self.num_dense_hidden = num_dense_hidden
- self.num_conv2d_layers = num_conv2d_layers
- self.num_dense_layers = num_dense_layers
- self.dropout_rate = dropout_rate
- self.classifier_kwargs = classifier_kwargs
- self.spec_norm_bound = spec_norm_bound
- # Defines the hidden layers.
- self.input_layer = tf.keras.layers.Conv2D(filters=self.num_conv2d_hidden, kernel_size=self.kernel_size, trainable=False) #
- self.conv2d_layers = [self.make_conv2d_layer() for _ in range(num_conv2d_layers)]
- def call(self, inputs, return_latent=False):
- # Projects the 2d input data to high dimension.
- hidden = self.input_layer(inputs)
- # Computes the ResNet hidden representations.
- for i in range(self.num_conv2d_layers):
- resid = self.conv2d_layers[i](hidden)
- hidden = tf.keras.layers.MaxPooling2D((2,2), strides=1, padding='same')(resid) #
- hidden += resid
- hidden = tf.keras.layers.Flatten()(hidden)
- if return_latent:
- return hidden
- return hidden
- def make_conv2d_layer(self):
- """Uses the Conv2d layer as the hidden layer."""
- conv2d_layer = tf.keras.layers.Conv2D(filters=self.num_conv2d_hidden, kernel_size=self.kernel_size, strides=1, padding='same', activation='relu')
- return spectral_normalization.SpectralNormalizationConv2D(
- conv2d_layer, norm_multiplier=self.spec_norm_bound)#
- def get_encoder():
- resnet_config = dict(num_classes=1, kernel_size=(3,3),
- num_conv2d_layers=3, num_dense_layers=2,
- num_conv2d_hidden=32, num_dense_hidden=64)
- resnet_model = DeepResNet(**resnet_config)
- return resnet_model
- #%% Task
- # GP
- class DeepResNet_GP(tf.keras.Model):
- """Defines a multi-layer residual network."""
- def __init__(self, num_classes, num_layers=3, num_hidden=128,
- dropout_rate=0.1, **classifier_kwargs):
- super().__init__()
- self.classifier_kwargs = classifier_kwargs
- # Defines the output layer.
- self.classifier = self.make_output_layer(num_classes)
- def call(self, inputs):
- # Projects the 2d input data to high dimension.
- hidden = inputs
- return self.classifier(hidden)
- def make_output_layer(self, num_classes):
- """Uses the Dense layer as the output layer."""
- return tf.keras.layers.Dense(
- num_classes, **self.classifier_kwargs)
- # The SNGP model
- # Define SNGP model
- import sys
- import gaussian_process
- import spectral_normalization
- class DeepResNetSNGP(DeepResNet_GP):
- def __init__(self, spec_norm_bound=0.95, **kwargs):
- self.spec_norm_bound = spec_norm_bound
- super().__init__(**kwargs)
- def make_output_layer(self, num_classes):
- """Uses Gaussian process as the output layer."""
- return gaussian_process.RandomFeatureGaussianProcess(
- num_classes,
- gp_cov_momentum=-1,
- **self.classifier_kwargs)#nlp_layers.gaussian_process.
- def call(self, inputs, training=False, return_covmat=False):
- # Gets logits and a covariance matrix from the GP layer.
- logits, covmat = super().call(inputs)
- # Returns only logits during training.
- if not training and return_covmat:
- return logits, covmat
- return logits
- class ResetCovarianceCallback(tf.keras.callbacks.Callback):
- def on_epoch_begin(self, epoch, logs=None):
- """Resets covariance matrix at the beginning of the epoch."""
- if epoch > 0:
- self.model.classifier.reset_covariance_matrix()
- class DeepResNetSNGPWithCovReset(DeepResNetSNGP):
- def fit(self, *args, **kwargs):
- """Adds ResetCovarianceCallback to model callbacks."""
- kwargs["callbacks"] = list(kwargs.get("callbacks", []))
- kwargs["callbacks"].append(ResetCovarianceCallback())
- return super().fit(*args, **kwargs)
- def get_task():
- resnet_config = dict(num_classes=3, num_layers=6, num_hidden=128)
- sngp_model = DeepResNetSNGPWithCovReset(**resnet_config)
- return sngp_model
- #%% ADDA
- adda = ADDA(get_encoder(), get_task(), get_discriminator(),
- loss=tf.keras.losses.CategoricalCrossentropy(from_logits=True), optimizer=Adam(0.00001, beta_1=0.5),
- copy=True, metrics=["acc"], random_state=0)
- adda.fit(Xs, ys_lab, Xt, yt_lab, epochs=100, batch_size=32, verbose=1);
- pd.DataFrame(adda.history_).plot(figsize=(8, 5))
- plt.title("Training history", fontsize=14); plt.xlabel("Epochs"); plt.ylabel("Scores")
- plt.legend(ncol=2)
- plt.show()
- sngp_logits, sngp_covmat = adda.task_(adda.encoder_.predict(Xt), return_covmat=True)
- sngp_variance = tf.linalg.diag_part(sngp_covmat)[:, None]
- sngp_logits_adjusted = sngp_logits / tf.sqrt(1. + (np.pi / 8.) * sngp_variance)
- sngp_probs = tf.nn.softmax(sngp_logits_adjusted, axis=-1)
- yt_pred = np.argmax(sngp_probs, axis=1)
- acc = accuracy_score(yt, yt_pred)
USEM.py at commit 1cf1101, no license · at the source
Overview
- Department of Mechanical Engineering, Virginia Tech, Blacksburg, VA USA
- VT Made, Virginia Tech, Blacksburg, VA USA
- Macromolecules Innovation Institute, Virginia Tech, Blacksburg, VA USA
- Department of Materials Science and Engineering, Johns Hopkins University, Baltimore, MD USA
- Department of Mechanical Engineering, Northwestern University, Evanston, IL USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
jcj7292/USEM
1cf1101acf6c6d90304be85061c846294008a1f1, 16 December 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: jcj7292/
USEM
Read it in the paper: doi.org/10.1038/s41598-026-51212-8.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 9 keywords, 1 funder, 17 references.
Cite
This paper
Chen, J., Long, T., Wall, M., Hufnagel, T., & Chen, W. (2026). Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization. Scientific reports, 16(1), 20837. https://
BibTeX
@article{chen2026uncerta
author = {Chen, Jie and Long, Timothy and Wall, Michael and Hufnagel, Todd and Chen, Wei},
title = {{Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization}},
journal = {Scientific reports},
year = {2026},
month = may,
volume = {16},
number = {1},
pages = {20837},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/
url = {https://
pmid = {42091981},
pmcid = {PMC13338178}
}
RIS
TY - JOUR
AU - Chen, Jie
AU - Long, Timothy
AU - Wall, Michael
AU - Hufnagel, Todd
AU - Chen, Wei
TI - Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 20837
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization",
"container-title": "Scientific reports",
"author": [
{
"family": "Chen",
"given": "Jie"
},
{
"family": "Long",
"given": "Timothy"
},
{
"family": "Wall",
"given": "Michael"
},
{
"family": "Hufnagel",
"given": "Todd"
},
{
"family": "Chen",
"given": "Wei"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "20837",
"DOI": "10.1038/
"PMID": "42091981",
"PMCID": "PMC13338178",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
6
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41598-024-65092-3 [code]
- Deep learning-based localization algorithms on fluorescence human brain 3D reconstruction: a comparative study using stereology as a reference.Journal: Scientific reportsIn common: Keras, OpenCV, TensorFlow, 4 other tools, 1 reference
- [2] doi:10.1038/s41467-022-33581-6 [code]
- Recurrent neural networks with explicit representation of dynamic latent variables can mimic behavioral patterns in a physical inference task.Journal: Nature communicationsIn common: TensorFlow, scikit-learn, pandas, 2 other tools, computational, computational modeling (no new data), 2 references
- [3] doi:10.1038/s41598-024-83867-6 [code]
- Task relevant autoencoding enhances machine learning for human neuroscience.Journal: Scientific reportsIn common: Keras, TensorFlow, scikit-learn, 3 other tools, 1 reference
- [4] doi:10.1038/s41467-025-61458-x [code]
- Computational models reveal that intuitive physics underlies visual processing of soft objects.Journal: Nature communicationsIn common: OpenCV, scikit-learn, pandas, 2 other tools, computational modeling (no new data), 1 reference
- [5] doi:10.1038/s41467-024-54688-y [code]
- Dynamic tracking of objects in the macaque dorsomedial frontal cortex.Journal: Nature communicationsIn common: TensorFlow, scikit-learn, pandas, 2 other tools, computational modeling (no new data), 1 reference
- [6] doi:10.1162/imag_a_00459 [code]
- Hierarchical surprise signals in naturalistic violation of expectations.Journal: Imaging neuroscience (Cambridge, Mass.)In common: OpenCV, scikit-learn, pandas, 2 other tools, 1 reference
- [7] doi:10.1073/pnas.2420287122 [code]
- Multiarea processing in body patches of the primate inferotemporal cortex implements inverse graphics.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: scikit-learn, pandas, Matplotlib, 1 other tool, 2 references
- [8] doi:10.1093/nsr/nwaf086 [code]
- Canine EEG helps human: cross-species and cross-modality epileptic seizure detection via multi-space alignment.Journal: National science reviewIn common: scikit-learn, pandas, Matplotlib, 1 other tool, 1 reference
- [9] doi:10.1126/sciadv.adw6726 [code]
- Dynamic context-based updating of object representations in the visual cortex.Journal: Science advancesIn common: scikit-learn, pandas, Matplotlib, 1 other tool, 1 reference
- [10] doi:10.1038/s41598-025-06779-z [code]
- Machine learning for experimental design of ultrafast electron diffraction.Journal: Scientific reportsIn common: scikit-learn, Matplotlib, NumPy, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:079a8cff0bedb348…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41598-026-51212-8)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41598-026-51212-8.svg
:target: https://openscicode.org/badge/doi/10.1038/s41598-026-51212-8
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41598-026-51212-8"><img src="https://openscicode.org/badge/doi/10.1038/s41598-026-51212-8.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
