Zing Forum

Reading

Fresnel Diffraction Neural Network: Open-Source Reproduction of Fudan Team's Optical AI Computing Framework

The open-source PyTorch reproduction project of the Fresnel Diffraction Neural Network (Fresnel DNN) proposed by the team of Zi Jian and Shi Lei from Fudan University supports single-layer MNIST classification (accuracy 97.08%) and double-layer grayscale image classification, providing a reusable simulation and training framework for optical neural network research.

菲涅尔衍射神经网络光学神经网络计算光学复旦大学深度学习PyTorch角谱传播相位掩模MNIST分类光学AI计算
Published 2026-05-30 21:45Recent activity 2026-05-30 21:48Estimated read 8 min
Fresnel Diffraction Neural Network: Open-Source Reproduction of Fudan Team's Optical AI Computing Framework
1

Section 01

[Introduction] Open-Source PyTorch Reproduction Project of Fudan's Fresnel Diffraction Neural Network, Supporting Reuse of Optical AI Computing Framework

The open-source PyTorch reproduction project of the Fresnel Diffraction Neural Network (Fresnel DNN) proposed by the team of Zi Jian and Shi Lei from Fudan University is maintained by yeungmkw. It supports single-layer MNIST classification (accuracy 97.08%) and double-layer grayscale image classification, providing a reusable simulation and training framework for optical neural network research. The project source is GitHub (link: https://github.com/yeungmkw/fresnel-dnn-repro), based on the team's papers published in Photonics Research in 2022 and 2024.

2

Section 02

Background: Rise of Diffraction Neural Networks and the Fresnel Number Bottleneck

Traditional neural networks rely on electronic computing, while Diffraction Neural Networks (DNN) use light wave propagation and interference to perform computations, proposed by the UCLA team in 2018. Early DNNs faced the bottleneck of Fresnel number constraints: the Fresnel number describes the strength of near-field and far-field effects, and excessively high or low values affect network expression ability. The Fudan team optimized performance by actively controlling the Fresnel number, increasing the single-layer MNIST classification accuracy to 97.08%, and expanded to a double-layer structure to process grayscale images.

3

Section 03

Core Mechanism: Physical Foundation and Structural Design of Fresnel Diffraction Neural Network

Optical Configuration

Use angular spectrum propagation to simulate light propagation (more accurate than Fraunhofer diffraction). The input image is encoded into the amplitude/phase of light, modulated by a phase mask, and forms a light intensity distribution on the detector plane. The region with the highest light intensity corresponds to the predicted category.

Fresnel Number Control

Formula: F = a²/(λ×z) (a = aperture size, λ = wavelength, z = propagation distance). Adjusting the propagation distance and encoding method improves convergence. The single-layer MNIST achieves an accuracy of 97.08% at a wavelength of 515nm.

Double-Layer Structure Expansion

The 2024 study introduced a DMD+SLM combined architecture to process complex grayscale images: DMD converts the input into PWM light pulses, which propagate through two layers of phase masks to the detector. The double-layer architecture achieves an accuracy of 95.10% on MNIST and 80.61% on Fashion-MNIST.

4

Section 04

Technical Architecture of the Open-Source Project: PyTorch Implementation and Modular Design

Code Design

Adopts a transparent reproduction strategy with annotations for unspecified details. Dependencies include Python3.12, uv, and PyTorch. Modular components include config (parameter management), data (data preprocessing), optics (optical computing), model (model definition), etc.

Angular Spectrum Propagation Implementation

Uses PyTorch complex tensors to represent the light field, supporting end-to-end training with automatic differentiation, simplifying phase mask optimization.

Loss and Training

Combines Sparse Cross-Entropy (SCE) and Mean Squared Error (MSE) losses, constrains phase values between 0-2π, and supports SGD/Adam optimizers and learning rate scheduling.

5

Section 05

Reproduction Limitations and Research Integrity: Transparently Addressing Assumptions and Uncertainties

  1. Detector Layout: The original paper did not公布 exact coordinates; the square grid layout in the code is a reasonable assumption.
  2. Spatial Target Construction: The paper did not explain the spatial distribution details of the SCE+MSE loss, so additional assumptions are needed for reproduction.
  3. Physical Simulation Boundaries: Hardware calibration, alignment errors, and noise are not modeled, leading to a gap between simulation and real experiments. The project openly reports these limitations to ensure research reliability.
6

Section 06

Application Value and Future Outlook: Energy Efficiency Potential of Optical Computing and Research Directions

Energy Efficiency Advantage

The inference process is completed via light propagation without power-consuming matrix operations, with energy efficiency several orders of magnitude higher than electronic chips, suitable for low-power scenarios like edge computing.

Educational Value

The project provides a research methodology textbook for the field of computational optics/optical AI, demonstrating the reproduction process and transparency.

Future Directions

Optimization of detector layout, multi-wavelength expansion, integration of physical calibration, and application to complex tasks like object detection.

7

Section 07

Conclusion: Open-Sourcing Cutting-Edge Research as the Cornerstone of Scientific Progress

The Fudan team's research is an important advancement in the field of optical AI computing, and the open-source reproduction project makes the成果 more accessible. Although there are limitations in reproduction, the honest attitude of facing them is the cornerstone of scientific progress. We look forward to more researchers participating to promote diffraction neural networks from the laboratory to practical applications.