SearcharxivSearch

arXiv subjects

Mostafa M. Rezaee

Publications and source records attributed to Mostafa M. Rezaee.

5 recordsLinked to original sources

Understanding LoRA Rank Trade-offs in Diffusion Model Fine-Tuning

Selecting LoRA rank for diffusion fine-tuning requires balancing quality and compute cost. We present a controlled study on CIFAR-10 using a DDPM U-Net with ranks {2,4,8,16,32}, fixed optimization settings, and a reproducible local-folder pytorch-fid protocol. We report FID, trainable parameters, runtime, and GPU memory, then validate trends with extended-budget DDPM runs (20 epochs; ranks 4/8/16) and a Tiny DiT backbone (10 epochs; ranks 4/8/16). Results show moderate ranks are most efficient: rank 4 achieves the best DDPM FID (124.1380), rank 8 is close (124.2136), and higher ranks provide limited gains despite larger adaptation cost. These findings support small-to-moderate ranks as practical defaults under fixed training budgets.

cs.AI

LoRA-Diffusion: Parameter-Efficient Fine-Tuning via Low-Rank Trajectory Decomposition

Parameter-efficient fine-tuning methods such as LoRA have transformed the adaptation of large autoregressive language models, enabling task-specific customization with substantially fewer trainable parameters. However, these methods have not been successfully extended to diffusion-based language models, which generate text through iterative denoising rather than sequential token prediction. We propose LoRA-Diffusion, a parameter-efficient fine-tuning approach that applies low-rank decomposition to the denoising trajectory instead of model weights. Unlike weight-based LoRA, which modifies individual transformation matrices, our method learns low-rank perturbations to the entire diffusion path from noise to output. We introduce trajectory-level low-rank adapters that modify each denoising step, step-adaptive rank allocation across diffusion phases, and compositional multi-task learning that allows merging task-specific modules at inference without retraining. On SST-2, QNLI, and MRPC, we report token-level denoising validation accuracy over five random seeds. LoRA-Diffusion achieves the highest mean performance on SST-2 and strong performance on QNLI and MRPC. Joint multi-task training further shows that LoRA-Diffusion achieves the highest token-level accuracy among the evaluated methods. The approach reduces per-task storage compared with full fine-tuning and establishes a parameter-efficient fine-tuning framework for diffusion language models.

cs.CL

Introducing an Extensible Open-Source Toolkit Suite for Studying Second Harmonic Generation: A Case Study of Depleted Pulsed Gaussian Wave SHG

Second Harmonic Generation (SHG) in nonlinear crystals has been extensively investigated, but most existing models still rely on simplifying assumptions. In realistic settings, thermal effects introduce complications that are difficult to capture analytically because the governing equations are highly coupled and nonlinear. Direct experimental characterization is also limited, since studying thermal effects would require spatiotemporal temperature data at every point in the crystal, which is not experimentally accessible. To address these limitations, we have developed a SHG Computational Toolkit Suite, a coordinated collection of independent modeling toolkits that cover different SHG scenarios under various physical conditions. Each toolkit focuses on a particular configuration or coupling mechanism, while the suite as a whole provides well-documented numerical implementations, reproducible workflows, and illustrative examples. Together, this article and the Toolkit Suite provide a coherent infrastructure for computational studies of SHG. It enables researchers to replicate, adapt, and extend our methods without duplicating foundational development efforts, thereby accelerating SHG research and promoting reproducibility.

physics.comp-ph

A Thermal Modeling Toolkit for Continuous-Wave Gaussian Second-Harmonic Generation in KTP Crystal

We release an open-source finite-difference toolkit for computing temperature fields in continuous-wave (CW) second-harmonic generation (SHG) using potassium titanyl phosphate (KTP) crystals under Gaussian end-pumping. The toolkit includes modules for geometry and material definitions, boundary and cooling models, and transient and steady-state finite-difference solvers. Users provide beam and crystal parameters along with cooling profiles, and the solver returns spatiotemporal temperature fields with radial and axial profiles as exportable datasets. This implementation consolidates previous work into a single versioned repository with reproducible pipelines and parameterized scenario sweeps covering temperature-dependent versus constant conductivity, convection with or without radiation, and heat-transfer coefficients from $6.5$ to $2.0 \times 10^{4}$~W~m$^{-2}$~K$^{-1}$. The compiled Fortran kernels include built-in benchmark reporting. Validation is performed by reproducing published temperature distributions and trends for KTP under Gaussian CW pumping. The code is available as an open-source GitHub repository and is released under the MIT license as version v1.0.0, with an archived release on Zenodo identified by DOI 10.5281/zenodo.17266421 for citation and long-term access.

physics.optics

Addressing Small and Imbalanced Medical Image Datasets Using Generative Models: A Comparative Study of DDPM and PGGANs with Random and Greedy K Sampling

The development of accurate medical image classification models is often constrained by privacy concerns and data scarcity for certain conditions, leading to small and imbalanced datasets. To address these limitations, this study explores the use of generative models, such as Denoising Diffusion Probabilistic Models (DDPM) and Progressive Growing Generative Adversarial Networks (PGGANs), for dataset augmentation. The research introduces a framework to assess the impact of synthetic images generated by DDPM and PGGANs on the performance of four models: a custom CNN, Untrained VGG16, Pretrained VGG16, and Pretrained ResNet50. Experiments were conducted using Random Sampling and Greedy K Sampling to create small, imbalanced datasets. The synthetic images were evaluated using Frechet Inception Distance (FID) and compared to original datasets through classification metrics. The results show that DDPM consistently generated more realistic images with lower FID scores and significantly outperformed PGGANs in improving classification metrics across all models and datasets. Incorporating DDPM-generated images into the original datasets increased accuracy by up to 6%, enhancing model robustness and stability, particularly in imbalanced scenarios. Random Sampling demonstrated superior stability, while Greedy K Sampling offered diversity at the cost of higher FID scores. This study highlights the efficacy of DDPM in augmenting small, imbalanced medical image datasets, improving model performance by balancing the dataset and expanding its size.

cs.CV