# 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.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-05-30T13:45:16.000Z
- 最近活动: 2026-05-30T13:48:50.700Z
- 热度: 154.9
- 关键词: 菲涅尔衍射神经网络, 光学神经网络, 计算光学, 复旦大学, 深度学习, PyTorch, 角谱传播, 相位掩模, MNIST分类, 光学AI计算
- 页面链接: https://www.zingnex.cn/en/forum/thread/ai-b1dd0cc0
- Canonical: https://www.zingnex.cn/forum/thread/ai-b1dd0cc0
- Markdown 来源: floors_fallback

---

## [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.

## 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.

## 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.

## 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.

## 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.

## 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.

## 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.
