Mohsen Mostafa EL Mahdy

Mohsen Mostafa EL Mahdy

Information System, October High Institute For Enginnering and Technology, Cairo, Al Qāhirah, Egypt
orcid

Research Focus & Metrics

Academic Career Length

1Year (2026-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
11 March 2026 in Preprints.org
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
Physics-informed neural networks (PINNs) have emerged as powerful tools for solving partial differential equations, but their training remains challenging due to ill-conditioned loss landscapes. While adaptive methods like Adam dominate deep learning, they exhibit instability on stiff PDEs, and second-order methods are computationally prohibitive. We present EPANG-Gen, an optimizer that combines memory-efficient eigen-decomposition with lightweight Bayesian uncertainty quantification. EPANG-Gen introduces three ele- ments: (1) a randomized eigenspace estimator that approximates Hessian curvature with O(dk) memory (k ≪ d), (2) Bayesian R-LayerNorm for per-activation uncertainty estima-tion, and (3) adaptive rank selection (PASA) that dynamically adjusts to problem difficulty. We evaluate EPANG-Gen on four benchmark PDEs—Poisson 1D, Burgers’ equation, Darcy flow, and Helmholtz 2D—and on the Taylor-Green vortex at Re = 100, 000, a canonical 3D turbulence problem. All experiments were conducted under computational constraints (Kaggle, NVIDIA P100 GPU, limited epochs). Results show that EPANG-Gen achieves performance comparable to Adam on the toughest turbulent regime while eliminating the 25% catastrophic failure rate of ADOPT across 72 runs. Ablation studies confirm that eigen- preconditioning contributes to performance improvements of 11–35%. The built-in uncer- tainty estimates provide confidence metrics at negligible cost. This work represents an initial exploration of curvature-aware optimization for PINNs; further validation with larger com- pute resources is needed. Code is available at https://github.com/EPANG-Gen/EPANG-Gen.

11 March 2026 in Preprints.org
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
This paper introduces Bayesian R-LayerNorm, a normalization layer that extends the previously proposed R-LayerNorm with uncertainty quantification. Building upon R-LayerNorm, we draw connections to statistical field theory, renormalization group methods, and infor-mation geometry to motivate the design. The method incorporates uncertainty estimation through a stable ψ-function, enabling adaptive noise suppression based on local entropy esti-mates. We provide theoretical analysis of numerical stability, gradient stability, and training convergence under standard assumptions. A key practical contribution is the integration of uncertainty quantification directly into the normalization operation, providing confidence estimates for each normalized activation without additional cost. The method adapts to local noise, varying normalization strength spatially based on estimated noise levels. The implementation is simple, adding only two learnable parameters per layer, and serves as a drop-in replacement for existing normalization layers. Due to computational constraints (Kaggle P100 GPU, limited epochs), we evaluate Bayesian R-LayerNorm on CIFAR-10-C using 50 training epochs and 3 random seeds. Under these limitations, it achieves average accuracy gains of +0.49% over standard LayerNorm across four common corruptions, with the largest improvement of +0.74% on shot noise. While these gains are modest, they are consistent across seeds. The method requires mini-mal computational overhead ( 10%) and we provide complete open-source implementation. We further show that the learned λ parameters offer interpretability, revealing which layers adapt most strongly to different corruptions. The framework suggests promising directions for trustworthy normalization in safety-critical applications where uncertainty matters alongside accuracy.

11 March 2026 in Preprints.org
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
The choice of activation function is a fundamental design decision in deep learning, yet most popular options like ReLU, GELU, or Swish are static and treat all inputs uniformly. This one-size-fits-all approach can be suboptimal when data contains heterogeneous noise, where the ideal non-linearity might depend on the input’s statistical context. In this paper, we introduce Bayesian Probabilistic Adaptive Sigmoidal Activation (Bayesian PASA), an activation function that adapts its behavior based on input uncertainty. The method frames activation selection as a Bayesian model averaging problem, adaptively mixing sigmoidal, linear, and noise-aware behaviors. Mixing weights are derived from a variational evidence lower bound (ELBO) and regularized by a ψ-function that bounds the influence of local noise estimates. We provide theo- retical analysis showing Lipschitz continuity, gradient bounds, and convergence under standard assumptions. Due to computational constraints (Google Colab, limited epochs), we evaluate Bayesian PASA on CIFAR-100 (50 epochs, 3 seeds) and CIFAR-10-C (100 epochs, 3 seeds). Despite these limitations, Bayesian PASA achieves 76.38% accuracy on CIFAR-100, slightly outperforming ReLU (75.68%) and GELU (75.98%) under the same constrained conditions. On corrupted CIFAR-10-C, Bayesian PASA combined with Bayesian R-LayerNorm achieves an average accuracy of 53.91%, a +1.87% improvement over the ReLU+LayerNorm baseline. These results, though modest, are consistent across seeds and suggest that Bayesian PASA offers a promising direction for uncertainty-aware activation functions, particularly when training re-sources are limited. Code is available at: https://github.com/BayesianPASA/BayesianPASA/

3 March 2026 in Preprints.org
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
We introduce R-LayerNorm, a novel normalization layer designed to handle noisy and corrupted image data by dynamically adjusting normalization strength based on local noise estimates. Unlike standard normalization methods that apply uniform scaling regardless of local corruption, R-LayerNorm incorporates a learn- able noise-sensitivity parameter (λ) and a spatial entropy-based noise estimator. When evaluated on the CIFAR-10-C benchmark across six diverse corruption types, R-LayerNorm achieves a statistically significant average accuracy improvement of +4.95% (p < 0.001) over standard BatchNorm, with particularly strong gains on contrast (+14.52%) and frost (+6.88%) corruptions. The method serves as a drop-in replacement for existing normalization layers, requires minimal computational over-head (∼10%), and demonstrates robust performance across multiple random seeds. Code is available at: https://github.com/R-LayerNorm/R-LayerNorm/tree/main.

20 October 2026 in Research Square
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
Joint-Embedding Predictive Architectures (JEPAs) are emerging as the backbone for latent world models in robotics and autonomous driving, yet injecting domain knowledge (physics, kinematics, geometry) into these models consistently degrades performance—with no theoretical explanation. We resolve this paradox by proving, through six theorems, that the isotropic maximum-entropy embedding is symmetry-stable under sequential prediction losses—no first-order incentive exists to rotate away from it under any Lipschitz, Euclidean-invariant prediction objective—and by validating across a phased empirical protocol that no non-Gaussian alternative outperforms it in practice. This yields a world-model design principle with a provable guarantee: encoder maximum-entropy, predictor dynamics, decoder physics—and explains why prior physics-informed JEPAs failed: they constrained the encoder, where constraints provably destroy the entropy guarantee, instead of the decoder, where they are provably benign. We validate this principle across two domains and two encoder mechanisms through a phased protocol covering measurement artifacts (Proposition 1: the N/K ≥ 5 reliability threshold), powered statistical testing (110 seeded ablation runs across autonomous driving and bimanual robotic manipulation, under both a SIGReg-regularized encoder and a marginal-only VAE-KL encoder—the encoder family of classical world models—with paired Wilcoxon significance and joint Holm correction in every domain×mechanism combination), and a budget replication demonstrating that the encoder-physics violation deepens with training. Phase 3 additionally characterizes an entropy–utility frontier on low-intrinsic-dimension robotics data, discovering that per-dimension variance matching alone produces correlated collapse—a failure mode invisible on high-dimensional data—and that optimization budget, not regularization weight, is the binding entropy constraint. We further show this failure generalizes: a marginal-only VAE-KL encoder collapses identically on the same data, and we introduce a posterior signal-fraction diagnostic revealing that such collapse can hide beneath the encoder’s own sampling-noise floor, invisible to marginal diagnostics. To test whether the placement rule matters beyond representation quality, we further probe its consequence for downstream control: a latent cross-entropy-method (CEM) planner built on the trained Phase 3 models consistently outperforms real-action replay on model-internal cost across ablation conditions and both encoder mechanisms—an impossible result for genuine planning, since replaying the true actions is itself the ground-truth solution. A model-exploitation diagnostic traces this to the planner discovering action sequences roughly a quarter of the action range away from the true trajectory while still lowering the learned decoder’s cost, uniformly regardless of physics placement and encoder choice. We report this transparently as a boundary condition on the practical claim: offline latent planning against a learned decoder is not, by itself, sufficient evidence that a representation supports downstream control, and we identify closed-loop, simulator-verified execution as the necessary next test. The result is the first formal, cross-domain-validated blueprint for physics-informed world models: place physics where the theorem says it is safe, never where intuition suggests—together with a concrete, reproducible cautionary result on how easily offline latent planning can be mistaken for evidence of control competence.

20 October 2026 in Research Square
Verified
Preprint
Open access
PDF file
Mohsen Mostafa EL MahdyMohsen Mostafa EL Mahdy
Mohsen Mostafa EL Mahdy
Gradient-based latent space planning faces a fundamental trade-off: maintaining high-entropy representations for robust perception under domain shift often yields ill-conditioned manifolds that destabilize trajectory optimization. DEGP introduces a framework designed to isolate gradient interference between representation learning and control dynamics via strict architectural separation. However, empirical evaluation demonstrates that structural decoupling alone is insufficient for closedloop planning, uncovering a fundamental information-usability gap driven by contact-conditional prediction errors and cost signal suppression. To delineate these operational limits, we provide analytical proofs establishing guaranteed spectral bounds on the predictor’s Jacobian under distribution shifts. Furthermore, we validate DEGP across manipulation tasks, introducing a telemetry-based runtime contract that quantifies the operational boundaries where geometric conditioning preserves planning stability.