Uncertainty aware machine learning for bridging simulation and experiment in high throughput materials characterization.
The 2 matches
- [1] § Proposed method › Machine learning model architecture ↔ USEM.py, lines 93–135 · score 0.76 · hidden layers, Spectral normalization, Strides, padding, filters, ReLU
- [2] § Technological background › Spectral-normalized Neural Gaussian Process (SNGP) ↔ USEM.py, lines 93–135 · score 0.62 · hidden representation, hidden layer, spectral, bounding, residual, dimensionality
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: 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: [code]
- Going deeper with morphologically detailed neural networks by simulation-based gradient propagationJournal: Frontiers in computational neuroscienceIn common: Keras, TensorFlow, Matplotlib, 1 other tool, none (in silico), computational, computational modeling (no new data), 1 reference
- [2] doi: [code]
- Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement controlJournal: eLifeIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [3] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [4] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: Keras, TensorFlow, OpenCV, 4 other tools - [5] doi:10.1371/journal.pcbi.1014571 [code]
- SynAPSeg: A novel dataset and image analysis framework for deep learning-based synapse detection and quantification.Journal: PLoS computational biologyIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [6] doi:10.1364/boe.605322 [code]
- Generalized plaque digitization framework for multi-dimensional mesoscopic images.Journal: Biomedical optics expressIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [7] doi:10.1038/s41467-026-74769-4 [code]
- Amphibian-inspired neuromorphic dynamic vision systems based on ferroelectric field-effect transistor.Journal: Nature communicationsIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [8] doi:10.1002/epi.70296 [code]
- Fully automated three-dimensional deep learning-based magnetic resonance imaging segmentation of brain cavities in epilepsy surgery.Journal: EpilepsiaIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [9] doi:10.1093/jnen/nlaf152 [code]
- Clinical and pathologic correlations of machine learning quantification of Aβ deposits across 3 brain regions of decedents with Alzheimer disease.Journal: Journal of neuropathology and experimental neurologyIn common: Keras, TensorFlow, OpenCV, 4 other tools
- [10] doi:10.1186/s12880-026-02481-2 [code]
- Deep learning-based neuroanatomical profiling reveals population-specific brain changes in multiple sclerosis: a large-scale Middle Eastern study.Journal: BMC medical imagingIn common: Keras, TensorFlow, OpenCV, 4 other tools
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:9b13424a8534a237…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
