betaFeedback

WorksPhysics and Astronomy

Tailoring Frictional Properties of Surfaces Using Diffusion Models

Abstract

This Letter introduces an approach for precisely designing surface friction properties using a conditional generative machine learning model, specifically a diffusion denoising probabilistic model (DDPM). We created a dataset of synthetic surfaces with frictional properties determined by molecular dynamics simulations, which trained the DDPM to predict surface structures from desired frictional outcomes. Unlike traditional trial-and-error and numerical optimization methods, our approach directly yields surface designs meeting specified frictional criteria with high accuracy and efficiency. This advancement in material surface engineering demonstrates the potential of machine learning in reducing the iterative nature of surface design processes. Our findings not only provide a new pathway for precise surface property tailoring but also suggest broader applications in material science where surface characteristics are critical.

Introduction

Traditional physics-based material design, often reliant on trial-and-error approaches, faces challenges of being resource-intensive and time-consuming [1]. To address these limitations, various iterative inverse design algorithms have emerged, introducing specific strategies to explore the configuration space efficiently. Notably, Alex Zunger’s group developed a genetic algorithm-based method for inverse design of materials’ band structures, enabling the prediction of materials with specific band gaps [2, 3, 4]. Additionally, a two-step inverse algorithm has been applied for tailoring the frictional properties of metals [5]. Recent advancements include the use of neural networks for rapid prediction of material properties, significantly accelerating the search process [6, 7, 8, 9, 10]. Despite these advancements, challenges remain, particularly regarding the convergence and iteration requirements of these iterative optimization-based methods.

In this Letter, we demonstrate the use of a diffusion denoising probabilistic model (DDPM) for generating surfaces with specific frictional properties, leveraging advancements in machine learning [11, 12]. Our methodology includes training the DDPM on synthetic surfaces, designed using simplex noise and labeled with frictional properties determined from molecular dynamics simulations. Once trained, the model efficiently generates targeted surfaces with a specified frictional strength without further optimization. This approach aligns with recent trends in material science, where generative machine learning models have been employed for material design [13, 14] and stress prediction [15, 16]. It also parallels developments in physics, such as latent variational diffusion models for inverse problems in high-energy physics [17]. Our method is distinguished by its direct input of

conditions into the model, generating outputs specific to those conditions.

Methodology

To prepare for training the DDPM, we first create a dataset linking surface topologies to friction properties. Simplex noise, known for its capability of generating realistic surfaces, is used to create these topologies [19]. For each sample, we randomly select a scaling factor between 2 and 10 and choose a number of octaves from 1, 2, or 3. Lacunarity and persistence are fixed at 2 and 1, respectively. The noise is thresholded to ensure a uniform porosity of 40% across all samples, represented as binary images (128×128128 \times128 pixels). For friction labeling, we perform MD simulations as displayed in Figure 1. To do this, we carve out the structure of depth 22 nm in orthorhombic α\alpha-quartz blocks with dimensions (20×20×4)(20 \times20 \times4) nm3^3. Thereafter, a perfect α\alpha-quartz crystal of dimensions (20×20×2)(20 \times20 \times2) nm3^3 is put on top of the crystal, slightly shifted in xx- and yy-directions to avoid perfect sintering. During the simulation we apply a sandwich structure like seen in for instance Refs. [20, 21], where the upper and lower 11 nm of the system is kept rigid and the atoms that are less than 11 nm from the rigid layers are controlled by a Langevin thermostat [22]. A small normal pressure of 4040 kPa is imposed on the rigid layers, while the entire system is sheared with a constant velocity of 55 m/s until the yield stress is reached, at a maintained temperature of 300300K. Static friction is measured as the maximum lateral force on the upper surface, and samples are categorized into ten friction classes. Periodicity in the surface topologies is ensured for compatibility with the simulations. MD simulations are performed in LAMMPS [23], with the SiO2_2 force field and parameters proposed by Broughton et al. [24].

Figure 1. Molecular dynamics simulation. (a) We keep the uppermost and lowermost layers of the system rigid, and apply a Langevin thermostat to the atoms close to the layers. Here, the upper system surface is partly transparent to show the structure. (b) The lateral force is measured while the system is sheared, and the static friction is taken as the largest lateral force. (c) Cross-sectional view of the system initially (1), just before failure (2) and after failure (3).

In our work, we leverage the capabilities of generative neural networks, focusing on the diffusion denoising probabilistic model (DDPM), a variant of diffusion models first proposed by Ref. [25]. DDPM represents an advancement over initial diffusion models, showcasing ease of training and the ability to generate state-of-the-art images [11]. The cornerstone of DDPMs lies in their ability to learn the reverse of a diffusion process — a denoising operation — being exposed to images that incrementally increase in noise through a controlled diffusion process. The forward diffusion process is mathematically expressed as:

q(xt+1∣xt,x0)=N(xt;μt(xt,x0),β~tI),(1)q(x_{t+1}|x_t, x_0) = \mathcal{N}(x_t; \mu_t(x_t, x_0), \tilde{\beta}_t I), \tag*{(1)}

where xtx_t is the structure at time step tt, μt(xt,x0)\mu_t(x_t, x_0) and β~t\tilde{\beta}_t, the mean and variance of the forward process, respectively, are derived from Brownian dynamics [11]:

μt(xt,x0):=αˉt−1βt1−αˉtx0+αt(1−αˉt−1)1−αˉtxt,(2)\mu_t(x_t, x_0) := \frac{\sqrt{\bar{\alpha}_{t-1}}\beta_t}{1-\bar{\alpha}_t}x_0 + \frac{\sqrt{\alpha_t}(1-\bar{\alpha}_{t-1})}{1-\bar{\alpha}_t}x_t, \tag*{(2)}
β~t:=1−αˉt−11−αˉtβt.(3)\tilde{\beta}_t := \frac{1-\bar{\alpha}_{t-1}}{1-\bar{\alpha}_t}\beta_t. \tag*{(3)}

Here, the variances of the forward process, βt\beta_t, can be seen as hyperparameters, αt:=1−βt\alpha_t := 1-\beta_t and αˉt:=∏s=1tαs\bar{\alpha}_t := \prod_{s=1}^{t}\alpha_s. The reverse process, in contrast, does not possess a closed-form solution and is inherently ambiguous. Neural networks is a good candidate to model such ambiguities, which is the main idea behind DDPMs. The denoising process is formulated as:

pθ(xt−1∣xt)=N(xt−1;μθ(xt,t),Σθ(xt,t)),(4)p_\theta(x_{t-1}|x_t) = \mathcal{N}(x_{t-1}; \mu_\theta(x_t,t), \Sigma_\theta(x_t,t)), \tag*{(4)}

where the mean μθ(xt,t)\mu_\theta(x_t,t) and the variance Σθ(xt,t)\Sigma_\theta(x_t,t), parameters of the model distribution, are determined by the neural network. Essentially, the network learns to estimate the conditional distribution of a less noisy image xtx_t, given a noisier image xt+1x_{t+1}, at each step of the reverse process. We refer to Ho et al. [11] for more details [11].

The conditional denoising model of choice was a U-Net backbone [26] as suggested by Ref. [11], with 6 downsampling and up-sampling blocks and skip-connections in between. An input block is used to increase the number of channels, and thus the complexity, while an output block is used to decrease the number of channels back to 1. Residual blocks [27] are used to avoid vanishing gradients, while we use circular padding in our convolutional layers to favor periodic structures. Conditions are input into the upsampling blocks through embedding networks. We adapt the classifier-free conditioning idea from Ref. [12], blending outputs from models trained with and without conditions. Our network comprises a substantial 705 million trainable parameters. We refer to Appendix § 0.6 for more details about the network architecture and Appendix § 1 for information about conditioning and embedding.

During the training process, we utilized a learning rate of 0.0001, a batch size of 16, and employed 400 denoising steps. It was observed that reducing the number of denoising steps led to a marked decrease in image quality. The model’s loss function is based on the mean-squared error, comparing the partial noise with the generated samples. To ensure equitable treatment of potential minority classes in the dataset, we implemented a weighted loss approach. The loss for each class is inversely proportional to its prevalence, calculated as 1/Nc1/N_c, where NcN_c represents the count of samples in each class.

Post-training, the network generates artificial samples corresponding to specified static friction strengths. These samples are then re-labeled using molecular dynamics simulations, as previously detailed, and their accuracy is validated by comparing the generated friction strengths with the targeted values. This process of training and validation, illustrating the transition from theoretical modeling to practical application, is depicted in Figure 2.

Figure 2. Training and validation of DDPM. (a) Binary structures are generated using simplex noise. (b) To label the structures by friction we carve out the structure in an α\alpha-quartz crystal. The static friction is measured by shearing the system in molecular dynamics simulations. (c) Diffusion and denoising process. A DDPM is trained to gradually denoise an image. (d) Fake samples are generated by denoising noise using the DDPM. The quality of the generated images is evaluated by comparing to the real samples using the FID score. (e) Conditioning is validated by labeling fake samples generated for a given label and comparing the two labels. Illustrations of carved surfaces are rendered with Ovito [18].

Results

Figure 3 presents validations of our yet best model, which was trained on 4,000 samples for 15,000 epochs. Training the model took around 10 days on an NVIDIA A100 graphics card. The measured static friction of the fake samples agree with the expected static friction across all classes (Figure 3a), with a mean-squared classification error of 0.50 μN20.50\,\mu\mathrm{N}^{2}. 45% of the fake samples are classified correctly and 74% fall into the correct class or neighbour classes. The morphology of the structures are analysed through a cluster and porosity analysis. In Figure 3b, we compare average cluster size and number of clusters of

Figure 3. Performance of model. (a) The expected static friction of fake samples as a function of the measured friction. (b) Average number of clusters (blue lines) and average cluster sizes, given in percentage of the total surface area (green lines) across classes. (c) Average porosity across all classes. (d) Mean-squared error loss as a function of epochs, log y-axis.

the fake samples with the training dataset. An apparent observation is that the average cluster size is monotonically increasing with class, which seems to be the primary friction dependency when the contact area is fixed. The fake samples consistently follow the same trend and reproduce the training dataset almost perfectly both when it comes to the average cluster size and the average number of clusters in each class. The average porosity of the fake samples is compared to the ground truth (40%) across the classes in Figure 3c. Most of the fake samples have a porosity close to 40%, but small deviations exist, especially for class 0 and 9. The mean-squared error loss is plotted as a function of epochs, which is strongly improving (Figure 3d). Such a loss drop indicates that the model is still learning and improving.

Lastly, we display some real and fake example samples for all the classes in Figure 4. At the first glance, the fake samples are very similar to the real one, but might have slightly sharper structures. For class 9, the average cluster size is slightly smaller for the fake samples compared to the real samples, which was also seen in Figure 3b. This can be a minority class feature, even though the minority classes were weighted during training. Increasing the size of the training dataset will most probably improve sample generation of the minority classes.

Image not extracted

Figure 4. Example samples. (a) Real samples generated with simplex noise across the 10 classes. (b) Fake samples generated by the DDPM across the 10 classes.

Conclusions and Perspectives

In conclusion, we have demonstrated a novel approach to the inverse design of surface properties, particularly focusing on friction, using a diffusion denoising probabilistic model (DDPM). This method marks a significant departure from traditional trial-and-error and numerical optimization techniques in surface engineering. By leveraging advanced machine learning algorithms, we have shown that it is possible to generate surface designs with precise frictional properties directly, thereby streamlining the design process and reducing the reliance on iterative testing.

Our methodology involved training a DDPM with a dataset of synthetic surfaces, each labeled with frictional properties derived from comprehensive molecular dynamics simulations. The resulting model was capable of producing high-fidelity surface designs that meet specific frictional criteria without the need for further optimization. This represents a significant efficiency improvement over conventional methods. We obtain a mean-squared classification error of 0.50 μN20.50\ \mu\mathrm{N}^{2} where 45% of the generated surfaces fall into the correct class.

Moreover, the application of this approach extends beyond the scope of frictional surface design. The principles and techniques demonstrated here can be adapted for a wide range of material science applications, potentially revolutionizing how surface properties are tailored for various industrial needs.

As we move forward, there are opportunities to refine and expand this methodology. The potential to incorporate continuous conditions into the model [28], adapt the network architecture for more complex problems, and explore other classes of generative models opens new avenues for research and application. These advancements could lead to even more precise control over material properties and further accelerate the pace of innovation in material science and engineering.

By demonstrating that the method works on a simple problem like this, we believe it will also work on more complex problems. For instance tailoring the color reflected from a surface [29]. One can also move to nonbinary samples and higher resolution. More complex problems might however require more complex network architectures. Our network is relative minimalist, and rather similar to the initial DDPM implementation [11]. The network can most likely be improved significantly by recent advances in machine learning. Other classes of generative models might also be examined, where a transformer network recently has shown impressive power [30]. In the same work, it was shown that more complex architectures consistently provided better performance. The network used in this work is relatively shallow compared to the networks presented there because of memory limitations. Increasing the complexity, e.g. the number of features, would most likely improve the model.

References

Model Architecture

The generative model that we use is based on a U-Net architecture [26], where the input resolution is gradually decreased down to a latent space while increasing the number of channels (downsampling). Thereafter, the latent space is upsampled back to the input shape, while taking inputs from the downsampling. The network consists of an input block, 6 general downsampling blocks, a special downsampling block converts input down to latent space, a special upsampling block from latent space, 6 general upsampling blocks and then an output block. There are skip-connections between pairwise upsampling-and downsampling blocks. The architecture blocks are illustrated in Figure 5a and dimensionality details are given in Tab. I.

Image not extracted

Figure 5. Architecture and conditioning of denoising model. (a) The denoising model takes a U-Net architecture, consisting of an input block (input), six standard downsampling blocks, one special downsampling block (spec-down), one special upsampling block (spec-up), six standard upsampling blocks and an output block (output). The information flow is shown by solid arrows: Information is passed linearly between the blocks, but skip-connections transport additional information directly to the standard upsampling blocks. (b) Each of the blocks consist of other blocks and layers. Both upsampling and downsampling blocks rely heavily on residual blocks (res), where the downsampling blocks also depend on deconvolutions. (c) Each residual block consists two stacked blocks of a convolutional layer and 3×33 \times3 kernel, batch normalization and GELU activation. (d) Embedding networks are used to input conditions and time step into upsampling blocks. (e) Embedding networks consist of a linear layer, GELU activation and then another linear layer.

Each of the 6 respective network building blocks consist of different subblocks and layers. The input block (input) consists of a residual block increasing the number of channels from 1 to 64. The downsampling blocks consist of a residual block doubling the number of channels, followed by a 2×22 \times2 max pooling layer reducing the resolution by a factor of 2 in both directions. The special downsampling block (spec-down) applies average pooling, followed by Gaussian error linear unit (GELU) activation. The special upsampling block (spec-up) uses a deconvolutional layer with a 2×22 \times2 kernel size, group normalization and rectified linear unit (ReLU) activation. Each upsampling block consists of a 2×22 \times2 deconvolutional layer, followed by two residual convolutional blocks. Finally, the output block (output) consists of a 3×33 \times3 convolutional layer, group normalization, ReLU activation and another 3×33 \times3 convolutional layer. Each of the blocks are outlines in Figure 5b.

Our residual block (res.) is structured following the principles outlined in Ref. [27]. It comprises a 3×33 \times3 convolutional layer, batch normalization, and GELU activation, which is then repeated once more. A distinctive feature of this block is its use of a skip-connection that adds the input directly to the output, enhancing information flow through the network. The detailed architecture of this residual block is depicted in Figure 5c.

block numberblock IDchannelsx-dimy-dim
0–1128128
1input64128128
2down11286464
3down22563232
4down35121616
5down4102488
6down5204844
7down6409622
8spec-down409611
9spec-up819222
10up1409644
11up2204888
12up310241616
13up45123232
14up52566464
15up6128128128
16output1128128

Table 1. Output dimensionalities of the various blocks found in Figure 5a. Upsampling blocks have twice as many channels as the corresponding downsampling blocks because of skip-connections.

Conditioning and Embedding

In our approach, conditions and timesteps are fed into all upsampling blocks, allowing the model to adjust its behavior dynamically during each denoising step. This is achieved by first converting the condition and timestep into a compatible dimensionality through embedding networks, which consist of a linear layer (for dimension transformation), GELU activation, and another linear layer (to increase variational parameters without changing dimensions). This process is shown in Figure 5d. The transformed embeddings are then integrated with the output of the upsampling blocks using the linear equation

a=a∘ce+te,~(5)\tilde{\mathbf{a} = \mathbf{a} \circ\mathbf{c}_e + \mathbf{t}_e,} \tag*{(5)}

where a\mathbf{a} is the output of the previous block, and ce\mathbf{c}_e and te\mathbf{t}_e are the embedded condition and timestep, respectively (Figure 5e).

Additionally, we apply the classifier-free conditioning method from [12], which blends outputs from models trained with and without conditions. This is described by the equation

ϵ~θ(z,c)=(1+w)ϵθ(z,c)−wϵθ(z),(6)\tilde{\epsilon}_\theta(z,c) = (1+w)\epsilon_\theta(z,c) - w\epsilon_\theta(z), \tag*{(6)}

where ϵθ(z,c)\epsilon_\theta(z,c) and ϵθ(z)\epsilon_\theta(z) are outputs from conditional and unconditional models, respectively, and ww is a weight parameter balancing training fidelity and diversity. In our work, ww is set to 1 for all generated samples. In our diffusion model, the tensor zz serves as the input, while cc, representing the condition, is a scalar in this context.

References

  1. [1]Romain Casati, Gilles Daviet, and Florence Bertails-Descoubes. Inverse elastic cloth design with contact and friction, 2016. URL https://hal.archives-ouvertes.fr/hal-01309617.
  2. [2]S. V. Dudiy and Alex Zunger. Searching for alloy configurations with target physical properties: Impurity design via a genetic algorithm inverse band structure approach. Phys. Rev. Lett., 97:046401, 2006.pubmed.ncbi.nlm.nih.gov/16907596
  3. [3]Paulo Piquini, Peter A. Graf, and Alex Zunger. Band-gap design of quaternary (in,ga)(as,sb) semiconductors via the inverse-band-structure approach. Phys. Rev. Lett., 100:186403, 2008.pubmed.ncbi.nlm.nih.gov/18518398
  4. [4]Liping Yu and Alex Zunger. Identification of potential photovoltaic absorbers based on first-principles spectroscopic screening of materials. Phys. Rev. Lett., 108:068701, 2012.pubmed.ncbi.nlm.nih.gov/22401127
  5. [5]Danuta Szeliga, Jerzy Gawad, and Maciej Pietrzyk. Inverse analysis for identification of rheological and friction models in metal forming. Computer Methods in Applied Mechanics and Engineering, 195(48):6778–6798, 2006.
  6. [6]Paul Z. Hanakata, Ekin D. Cubuk, David K. Campbell, and Harold S. Park. Accelerated search and design of stretchable graphene kirigami using machine learning. Phys. Rev. Lett., 121:255304, 2018.DOI
  7. [7]Charles Yang, Youngsoo Kim, Seunghwa Ryu, and Grace X. Gu. Using convolutional neural networks to predict composite properties beyond the elastic limit. MRS Communications, pages 609–617, 2019.DOI
  8. [8]Chi-Hua Yu, Zhao Qin, and Markus J. Buehler. Artificial intelligence design algorithm for nanocomposites optimized for shear crack resistance. Nano Futures, 3(3):035001, 2019.DOI
  9. [9]Paul Z. Hanakata, Ekin D. Cubuk, David K. Campbell, and Harold S. Park. Forward and inverse design of kirigami via supervised autoencoder. Phys. Rev. Res., 2:042006, 2020.DOI
  10. [10]Fahimeh Najafi, Henrik Andersen Sveinsson, Christer Dreierstad, Hans Erlend Bakken Glad, and Anders Malthe-Sørenssen. Modeling the relationship between mechanical yield stress and material geometry using con- volutional neural networks. Applied Physics Letters, 123 (11):111601, 2023.
  11. [11]Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models, 2020.arxiv.org/abs/2006.11239
  12. [12]Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance, 2022.arxiv.org/abs/2207.12598
  13. [13]Yunwei Mao, Qi He, and Xuanhe Zhao. Designing complex architectured materials with generative adversarial networks. Science Advances, 6(17):eaaz4169, 2020.
  14. [14]Chun-Teh Chen and Grace X. Gu. Generative deep neural networks for inverse materials design using back-propagation and active learning. Advanced Science, page 1902607, 2020.
  15. [15]Haoliang Jiang, Zhenguo Nie, Roselyn Yeo, Amir Barati Farimani, and Levent Burak Kara. StressGAN: A generative deep learning model for two-dimensional stress distribution prediction. Journal of Applied Mechanics, 88, 2021.
  16. [16]Markus J. Buehler. Predicting mechanical fields near cracks using a progressive transformer diffusion model and exploration of generalization capacity. Journal of Materials Research, 38(5):1317–1331, 2023.
  17. [17]Alexander Shmakov, Kevin Greif, Michael Fenton, Aishik Ghosh, Pierre Baldi, and Daniel Whiteson. End-to-end latent variational diffusion models for inverse problems in high energy physics, 2023.
  18. [18]Alexander Stukowski. Visualization and analysis of atomistic simulation data with OVITO-the open visualization tool. Modelling and Simulation in Materials Science and Engineering, 18(1):015012–015012, 2010.
  19. [19]Ken Perlin. Improving noise. ACM Transactions on Graphics, pages 681–682, 2002.
  20. [20]Ao Li, Yun Liu, and Izabela Szlufarska. Effects of interfacial bonding on friction and wear at silica/silica interfaces. Tribology Letters, 56(3):481–490, 2014.
  21. [21]Even Marius Nordhagen, Henrik Andersen Sveinsson, and Anders Malthe-Sørenssen. Diffusion-driven frictional aging in silicon carbide. Tribol Lett, 71(3):95, 2023.
  22. [22]T. Schneider and E. Stoll. Molecular-dynamics study of a three-dimensional one-component model for distortive phase transitions. Physical Review B, 17(3):1302–1302, 1978.
  23. [23]Aidan P. Thompson, H. Metin Aktulga, Richard Berger, Dan S. Bolintineanu, W. Michael Brown, Paul S. Crozier, Pieter J. in ’t Veld, Axel Kohlmeyer, Stan G. Moore, Trung Dac Nguyen, Ray Shan, Mark J. Stevens, Julien Tranchida, Christian Trott, and Steven J. Plimpton. LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Computer Physics Communications, 271:108171, 2022.
  24. [24]Jeremy Q. Broughton, Christopher A. Meli, Priya Vashishta, and Rajiv K. Kalia. Direct atomistic simulation of quartz crystal oscillators: Bulk properties and nanoscale devices. Physical Review B, 56(2):611–618, 1997.
  25. [25]Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics, 2015.
  26. [26]Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation, 2015.
  27. [27]Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition, 2015.
  28. [28]Xin Ding, Yongwei Wang, Zuheng Xu, William J. Welch, and Z. Jane Wang. Continuous conditional generative adversarial networks for image generation: Novel losses and label input mechanisms, 2021.
  29. [29]Jacob Andkjær, Andreas E. H. Zickler, Kasper Storgaard Friis, and Ole Sigmund. Inverse design of nanostructured surfaces for color effects. J. Opt. Soc. Am. B, JOSAB, 31(1):164–174, 2014.
  30. [30]William Peebles and Saining Xie. Scalable diffusion models with transformers, 2023.arxiv.org/abs/2212.09748

Paper details

vlnc:W_5qtj9scr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents