Source-linked AI summary

Inferring Dislocation Microstructures from X-ray Diffraction via Cross-Modal Contrastive Learning

Benjamin Udofia, Nicolas Bertin, Markus Stricker

arXiv:2609.12713v1cond-mat.mtrl-scics.LG

TL;DR

Inferring dislocation structures from diffraction remains challenging because diffraction measurements provide only indirect information. This paper pairs simulated dislocation density fields with virtual X-ray patterns and aligns them through cross-modal contrastive learning. The authors report accurate retrieval from previously unseen patterns using a small representative subset of the simulated dataset.

  • Problem

    Existing approaches analyze diffraction patterns and dislocation microstructures independently and do not explicitly address mapping diffraction patterns back to structures.

    Source: §1 · p. 2
  • Method

    The framework pairs DDD-generated density fields with corresponding virtual X-ray diffraction patterns and learns a shared latent representation using cross-modal contrastive learning.

    Source: §1 · p. 2
  • Results

    Approximately 500 (5%) representative observations suffice for accurate retrieval from previously unseen diffraction patterns, reducing training data by approximately 95% relative to 10,000 observations.

    Source: §6 · p. 13
  • Takeaways & Limitations

    Farthest point sampling selects representative subsets that capture the dominant structural variability in the simulated dataset.

    Source: §6 · p. 13

    The framework is restricted to simulated data with paired structures; extending it to general experimental applications requires substantially larger paired datasets and must account for additional experimental variability.

    Source: §10 · p. 13

Abstract

from arXiv · show

Understanding and inferring dislocation microstructures from diffraction patterns remains an open challenge in materials characterization, as diffraction measurements provide only indirect information about the underlying dislocation structure. In this work, a cross-modal learning framework is developed to enable the prediction of 3D dislocation structures directly from diffraction data. Dislocation density fields generated from discrete dislocation dynamics simulations are paired with corresponding virtual X-ray diffraction patterns and embedded into a shared 2D latent space using contrastive learning. The alignment between structural and diffraction representations of dislocation structures is evaluated directly in the learned latent space using correlations between corresponding latent features. To estimate the role of dataset size for this approach, farthest point sampling is employed to construct representative and diverse training subsets of varying sizes. The results show strong cross-modal alignment and that model performance improves rapidly with increasing dataset size. Near-saturation is achieved with approximately 500 representative observations from a dataset of 10,000 observations, enabling accurate prediction of dislocation density fields from previously unseen diffraction data of the same distribution. Qualitative comparisons confirm that the predicted structures capture the dominant spatial features of the underlying dislocation microstructures. These findings demonstrate an efficient approach for learning structure-diffraction relationships and highlight the potential for inferring structural characteristics of dislocation networks directly from diffraction patterns, providing a pathway toward diffraction-based structural analysis and future extension to experimental data.

1 Introduction

Diffraction provides indirect information about dislocations, and mapping diffraction signatures back to underlying structures remains an open challenge. The paper presents a cross-modal learning framework to infer dislocation structures from diffraction patterns.

1 Introduction

  • Dislocations carry plastic deformation, and their spatial organization is important for linking microstructural processes to material behavior.Laue microdiffraction provides indirect insights through peak broadening, streaking, and intensity variations.Source: §1 · p. 1
  • Dense dislocation networks make individual-dislocation identification impractical, limiting the approach described for isolated dislocations.Manual diffraction analysis is also time-consuming and prone to errors.Source: §1 · pp. 1–2
  • Existing approaches treat structural and diffraction data independently and do not explicitly address the inverse mapping from diffraction patterns to dislocation structures.The paper identifies this as a gap despite advances in DDD simulations, virtual diffraction, and machine-learning characterization.Source: §1 · p. 2
  • The framework pairs DDD-generated dislocation configurations with virtual X-ray diffraction patterns to learn their relationship.It represents structures as density fields, uses Isomap and farthest point sampling to select diverse configurations, and trains a contrastive model to align modalities in a shared latent space.Source: §1 · p. 2

2 Methods

The methods construct paired structural and diffraction data from simulated dislocation configurations, then prepare each modality for cross-modal learning. The workflow converts variable-length networks and high-dimensional diffraction patterns into compact representations.

2 Methods

  • The workflow converts dislocation-density fields into 1,024 structural features and virtual XRD patterns into 735 variance-selected diffraction features, then maps both representations through modality-specific projectors into a shared latent space using cross-modal contrastive learning.Source: Figure 1 · p. 3

2.1 Discrete Dislocation Dynamics Simulations

  • DDD simulations generate the dislocation configurations, which are converted into voxelized density fields with 1,024 features for the structural representation.The dataset contains 10,000 retained configurations across loading conditions, including misorientations.Source: §2.1 · pp. 2–3

2.2 Virtual X-ray Diffraction Generation

  • Virtual Laue diffraction patterns are computed from each simulated dislocation configuration by evaluating its deformation-gradient field and ray-tracing diffracted intensities onto a virtual detector.The calculation uses strain and lattice-rotation effects on local diffraction conditions.Source: §2.2 · p. 4
  • Each diffraction pattern contains 458,752 intensity features, reduced by variance-based selection to a compact set of informative pixels.The workflow pairs the resulting diffraction representation with its density-field representation for cross-modal learning.Source: §2.1 · p. 3, §2.2 · p. 4

3 Machine Learning Methodologies

The methodology builds a shared latent representation for density fields and their paired diffraction patterns. Isomap preserves manifold relationships, farthest point sampling selects diverse paired observations, and contrastive learning aligns corresponding modalities.

3.1 Manifold Learning

  • Isomap embeds the 1,024-feature density fields in a lower-dimensional space while preserving geodesic relationships on a neighborhood graph.Distances in the resulting embedding are used to identify structurally diverse configurations.Source: §3.1 · p. 4

3.2 Farthest Point Sampling

  • FPS greedily adds embeddings farthest from the retained set to cover structural variability with less redundancy, carrying each paired virtual XRD pattern into training.It is used because nearby or consecutively recorded configurations can be redundant, while including every configuration is computationally infeasible.Source: §3.2 · p. 5

3.3 Cross-Modal Contrastive Learning

  • Density fields encode spatial dislocation content while diffraction reflects volume-integrated lattice distortion; same-observation pairs are positive and different-observation pairs negative.These paired examples provide the cross-modal training signal.Source: §3.3 · p. 5
  • Because distinct configurations can produce similar diffraction signatures, the model learns structure-diffraction correspondence rather than explicitly inverting the forward calculation.The objective is to bring corresponding pairs together in latent space while keeping unrelated pairs separated.Source: §3.3 · p. 5
  • Two MLP encoders map density fields and diffraction patterns to 2D L2-normalized latents, trained with InfoNCE to align positive pairs and separate negatives.The two-dimensional latent space permits direct visualization of cross-modal alignment.Source: §3.3 · pp. 5–6

4 Results

The results establish a structural manifold for DDD-generated microstructures, use farthest point sampling to select diverse paired XRD data, and evaluate cross-modal alignment and retrieval. Performance in the shared latent space approaches a plateau at about 500 selected observations, while retrieved structures retain broad spatial similarity to the ground truth.

4.1 Dislocation Microstructure Dataset

  • The Isomap manifold retains clusters for four nominal loading orientations and continuous within-cluster trajectories reflecting dislocation-structure evolution with increasing strain.Configurations are treated as observations of dislocation states, providing a structural basis for subsequent sampling and cross-modal analyses.Source: §4.1 · p. 6

4.2 Representative Subset Selection

  • Farthest point sampling selects observations farthest from those already chosen, distributing subsets across the structural manifold.Sets grow from 10 to 9000 observations; the 500-point subset closely approximates the full distribution while resolving finer variations.Source: §4.2 · pp. 6–7

4.3 Multimodal Data Integration

  • The virtual diffraction dataset pairs 10,000 patterns with density fields, and variance selection reduces each diffraction representation from 458,752 to 735 features.Retained pixels exceed a variance threshold of 1.08 × 10^8, corresponding to the 99.84th percentile.Source: §4.3 · pp. 7–8

4.4 Cross-Modal Representation Learning

  • Density-field and diffraction embeddings occupy closely aligned regions of the shared latent space, with R2 values of 0.9996 and 0.9995 for dimensions 1 and 2.The validation set comprises the next 1000 FPS-ordered observations, selected to assess generalization to structurally distinct samples.Source: §4.4 · p. 9
  • For each validation diffraction pattern, the model retrieves the nearest training structure by cosine similarity rather than reconstructing a new density field.The retrieved fields are compared with ground truth in the original and latent spaces; associated DDD configurations can be looked up.Source: §4.4 · pp. 9–10
  • In the shared latent space, cosine similarity rapidly approaches unity and plateaus at approximately 500 FPS-selected observations, while similarity is lower in the original density-field space.Qualitative comparisons show broadly similar spatial distributions, although individual segment positions and geometries vary.Source: §4.4 · p. 10

5 Discussion

Retrieval improves with larger FPS-selected training subsets, while cross-modal embeddings align structural and diffraction representations. Qualitative comparisons show that prediction quality varies across observations.

5 Discussion

  • Structural and diffraction embeddings align in a shared 2D latent space, with corresponding dimensions reaching R2 values of 0.9996 and 0.9995.The framework learns this relationship from paired observations rather than explicitly solving the non-unique inverse diffraction problem.Source: §5 · p. 10
  • Mean cosine similarity rises from 0.086 with 10 FPS-selected observations to 0.895 with 500 and 0.998 with 9000, with smaller gains beyond approximately 500.Retrieval in the learned latent structural space also consistently outperforms retrieval in the original density-field space.Source: Figure 8 · p. 11, §5 · p. 11
  • Approximately 500 representative observations capture essential variability in the simulated dataset, reducing the need for exhaustive sampling and limiting costly forward diffraction simulations.Structures within each trajectory are correlated, and high-strain configurations cannot be simulated independently.Source: §5 · p. 11
  • The 500-FPS predictions generally resemble ground truth, but agreement varies: the highest-similarity example is close, while the lowest shows noticeable deviations.Predictions from the 10-FPS subset show clear discrepancies.Source: §5 · p. 11

10 FPS

Qualitative examples compare retrieved and ground-truth structures, while the discussion identifies limits tied to simulated data, beam direction, and experimental variability.

10 FPS

  • For 500-FPS validation examples, the highest-similarity retrieval closely matches ground truth, while the lowest-similarity example shows noticeable deviations.The figure also compares a representative observation from the 10-FPS subset.Source: Figure 9 · p. 12, §10 · p. 13
  • Because the framework uses uniquely paired simulated patterns and one fixed beam direction, broader settings introduce one-to-many mappings and may require connectivity-aware descriptors.The current structural representation is based on density fields.Source: §10 · p. 13
  • Experimental measurements add variability absent from idealized simulations but may contain useful instrumental and material contrast; larger paired datasets are needed for general experimental applications.The source identifies these as requirements for extending the framework.Source: §10 · p. 13

6 Conclusion

The conclusion reports cross-modal alignment and accurate retrieval from a representative subset of simulated observations, while limiting the demonstrated framework to uniquely paired simulated data.

6 Conclusion

  • The framework establishes a shared latent representation for dislocation structures and their corresponding diffraction patterns through cross-modal contrastive learning.The conclusion describes alignment between modalities and near-unity R2 values for corresponding latent dimensions.Source: §6 · p. 13
  • Approximately 500 observations (5% of the 10,000-observation dataset) enable accurate retrieval from previously unseen diffraction patterns, reducing training data needs by approximately 95%.Representative subsets are selected using farthest point sampling.Source: §6 · p. 13
  • The framework was developed and evaluated on simulated data with uniquely paired structures and diffraction patterns; extending it will require addressing inverse-mapping ambiguity.The conclusion identifies larger simulated datasets and experimental measurements as future directions.Source: §6 · p. 13

Declarations

The declarations report funding, no competing interests, data and code availability, and author contributions.

Declarations

  • Funding acknowledgments include DFG project STR 1729/1-1, ERC grant DISCO-DATA, and LLNL's LDRD program.The passage also specifies project numbers and funding qualifications.Source: Declarations · p. 13
  • The authors report no applicable conflict of interest or competing interests.Source: Declarations · p. 13
  • The density-field and forward-simulated XRD data and study code are reported as available online.The passage names Zenodo for the data and GitLab for the code.Source: Declarations · p. 14
  • Author contributions are assigned across methodology, software, analysis, investigation, data curation, writing, visualization, resources, supervision, and project administration.Source: Declarations · p. 14
Loading 2609.12713v1…