Powder diffraction is an important and powerful technique widely used across many scientific fields. In recent years, primarily due to the development of ever more intense synchrotron sources and improvements in fast, large-area detectors, the amount of data acquired during a powder diffraction experiment has increased tremendously. The time-lag between data acquisition and analysis can create a bottleneck and limit the potential of experiments, thereby reducing efficiency. In the near future, real-time data interpretation tools will be necessary. In this master’s thesis, we aim to develop artificial neural network models for the prediction of lattice parameters from powder diffraction spectra. We start with spectra calculated from real experimental data. From the text files .cif, we can extract the species, symmetry, and general structure of a crystal. From this, it is possible to calculate the powder diffraction spectrum, which consists of peaks with variable intensity and position within a chosen angular range. The positions of the peaks, in addition to depending on the energy of the X-ray used, will directly depend on the lattice parameters. To determine these parameters, it is necessary to know the crystallographic system a priori (one of cubic, hexagonal, tetragonal, trigonal, orthorhombic, monoclinic, or triclinic). A prediction model for the crystallographic system was recently developed by the Institute of Crystallography at the National Research Center in Bari \cite{CrystalMela}. Based on the crystallographic system information, we developed and trained convolutional neural networks. The initial spectrum is passed through several convolution blocks, characterized by a series of filters and pooling layers. Each filter is designed to detect specific features such as edges, corners, textures, or other structures. Using a large number of layers enables the network to recognize increasingly abstract features. The output of the convolution is then passed to the pooling layer, which reduces its dimensionality. The final image, resulting from the application of multiple filters and pooling, is flattened and passed to a fully connected neural network that extracts the six lattice parameters. In addition to this architecture, a new model based on transformers, the architecture used in recent large language models like GPT and Gemini, was implemented. The spectrum is divided into patches (which will become tokens), projected into a higher dimension, and an additional cls token is added. These tokens are passed through a series of 2/4 transformers. In the final part of the model, the information from the cls token is passed to a fully connected network that extracts the lattice parameters. The prediction results of the models will be analyzed with a certain level of methodological rigor and compared with reference results from other papers. The following work is the result of six months of research conducted at the University of Zurich, Switzerland, in the Laboratory for Quantum Matter Research group led by Prof. Johan Chang and under the co-supervision of Dr. Leonardo Martinelli. The project is in collaboration with the Institute of Crystallography of the National Research Center of Bari and has seen constant collaboration with Prof. Rosanna Rizzi.
a diffrazione da polveri `e un importante e potente tecnica ampiamente utilizzata in numerosi ambiti scientifici. Nel corso degli ultimi anni, grazie principalmente allo sviluppo di sincrotroni a sempre più alta intensità ed il miglioramento dei rilevatori veloci a grande area, la quantità di dati acquisiti durante un esperimento di diffrazione sono aumentati enormemente. Il time-lag tra l'acquisizione e l'analisi dei dati può creare un collo di bottiglia e limitare le potenzialità degli esperimenti e la conseguente efficienza. Nel recente futuro sarà necessario avere strumenti per l'interpretazione dei dati in tempo reale. In questo lavoro di tesi magistrale cercheremo di sviluppare modelli di reti neurali artificiali per la predizione dei parametri di cella da spettri di diffrazione di polveri. Siamo perciò partiti da spettri calcolati da dati reali di esperimenti. Dai file di testo .cif, possiamo ricavare le specie, la simmetria e la struttura in generale di un cristallo. Da questa è possibile calcolare lo spettro di diffrazione da polveri, una sequenza di picchi di intensità e posizione variabile in un intervallo di angolo scelto. La posizion e dei piccchi, oltre a dipendere dall'energia del raggio-X utilizzato, dipenderà direttamente dai parametri di cella. Per determinare quest'ultimi è necessario sapere a priori il sistema cristallino (uno tra cubico, esagonale, tetragonal, trigonale, ortorombico, monoclino e triclino). Un modello di predizione del sistema cristallino è stato precedentemente sviluppato dal CNR di Bari sotto il nome di CrystalMela. Partendo dall'informazione del sistema cristallino, abbiamo sviluppato e allenato reti neurali di convoluzione. Lo spettro iniziale è passato a più blocchi di convoluzione caratterizzati da una serie di filtri e layer di pooling. Ogni filtro è progettato per rilevare caratteristiche specifiche come bordi, angoli, texture o altre strutture. Man mano che si passa dai primi strati a quelli successivi, la rete è in grado di riconoscere caratteristiche sempre più astratte. L'output della convoluzione viene poi passata al pooling che ne riduce la dimensione. L'immagine finale, risultato dell'applicazione di più filtri e pooling, viene appiattita e passata ad una rete neurale completamente connessa che ne estrae i sei parametri i cella. Oltre a questa architettura, un nuovo modello basato sui transformer, architettura utilizzata nei più recenti Large-Language-Model come GPT e Gemini, è stato implementato. Lo spettro viene diviso in patch (che costituiranno i token), proiettato in dimensione maggiore ed un'ulteriore token cls viene aggiunto. Questi tokens vengono passati ad una serie di 2/4 transformer. Nella parte finale del modello, l'informazione del token cls viene passata ad una rete completamente connessa che estrae i parametri di cella. Verranno analizzati i risultati di predizione dei modelli, seguendo un certo livello di rigore metodologico, e confrontati con risultati di riferimento di altri papers. Quanto segue è frutto di sei mesi di lavoro svolto presso l'Università di Zurigo, nel gruppo di Laboratory for Quantum Matter Research gestito dal prof. Johan Chang e con la co-supervisione del Dr. Leonardo Martinelli. Il progetto è in collaborazione con l'Istituto di Cristallografia del Centro Nazionale di Ricerca di Bari ed ha visto la costante collaborazione della Prof.ssa Rosanna Rizzi.
Recognition of crystal lattice parameters using deep learning techniques
Pasquetto, Lorenzo
2024/2025
Abstract
Powder diffraction is an important and powerful technique widely used across many scientific fields. In recent years, primarily due to the development of ever more intense synchrotron sources and improvements in fast, large-area detectors, the amount of data acquired during a powder diffraction experiment has increased tremendously. The time-lag between data acquisition and analysis can create a bottleneck and limit the potential of experiments, thereby reducing efficiency. In the near future, real-time data interpretation tools will be necessary. In this master’s thesis, we aim to develop artificial neural network models for the prediction of lattice parameters from powder diffraction spectra. We start with spectra calculated from real experimental data. From the text files .cif, we can extract the species, symmetry, and general structure of a crystal. From this, it is possible to calculate the powder diffraction spectrum, which consists of peaks with variable intensity and position within a chosen angular range. The positions of the peaks, in addition to depending on the energy of the X-ray used, will directly depend on the lattice parameters. To determine these parameters, it is necessary to know the crystallographic system a priori (one of cubic, hexagonal, tetragonal, trigonal, orthorhombic, monoclinic, or triclinic). A prediction model for the crystallographic system was recently developed by the Institute of Crystallography at the National Research Center in Bari \cite{CrystalMela}. Based on the crystallographic system information, we developed and trained convolutional neural networks. The initial spectrum is passed through several convolution blocks, characterized by a series of filters and pooling layers. Each filter is designed to detect specific features such as edges, corners, textures, or other structures. Using a large number of layers enables the network to recognize increasingly abstract features. The output of the convolution is then passed to the pooling layer, which reduces its dimensionality. The final image, resulting from the application of multiple filters and pooling, is flattened and passed to a fully connected neural network that extracts the six lattice parameters. In addition to this architecture, a new model based on transformers, the architecture used in recent large language models like GPT and Gemini, was implemented. The spectrum is divided into patches (which will become tokens), projected into a higher dimension, and an additional cls token is added. These tokens are passed through a series of 2/4 transformers. In the final part of the model, the information from the cls token is passed to a fully connected network that extracts the lattice parameters. The prediction results of the models will be analyzed with a certain level of methodological rigor and compared with reference results from other papers. The following work is the result of six months of research conducted at the University of Zurich, Switzerland, in the Laboratory for Quantum Matter Research group led by Prof. Johan Chang and under the co-supervision of Dr. Leonardo Martinelli. The project is in collaboration with the Institute of Crystallography of the National Research Center of Bari and has seen constant collaboration with Prof. Rosanna Rizzi.File | Dimensione | Formato | |
---|---|---|---|
2025_04_Pasquetto_ExecutiveSummary.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: Executive Summary
Dimensione
1.12 MB
Formato
Adobe PDF
|
1.12 MB | Adobe PDF | Visualizza/Apri |
2025_04_Pasquetto_Thesis_Final.pdf
accessibile in internet per tutti
Descrizione: final version with few corrections
Dimensione
8.75 MB
Formato
Adobe PDF
|
8.75 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/234954