Skip to content

kylemath/OpticalNeuralNet

Repository files navigation

LightGen Explorer

An interactive web application exploring LightGen, the world's first all-optical generative AI chip, as described in the paper published in Science (December 2025).

🔗 Live Demo ← Update with your GitHub Pages URL


About the Paper

Citation

Chen, Y., Sun, X., Tan, L., Jiang, Y., Zhou, Y., Zhang, W., & Zhai, G. (2025). All-optical synthesis chip for large-scale intelligent semantic vision generation. Science, 390(6779), 1259-1265. DOI: 10.1126/science.adv7434

The Problem

Large-scale generative AI faces a severe computing power shortage:

  • Stable Diffusion generates CO₂ emissions per 1000 inferences equivalent to driving 4.1 miles
  • Llama-7B takes >3 seconds to infer 100 tokens on NVIDIA A10
  • Energy and latency prohibit extensive edge deployment

The Solution: LightGen

LightGen is an all-optical photonic chip that performs generative AI computations using light instead of electrons.

Metric LightGen NVIDIA A100 Improvement
Computing Speed 3.57×10⁴ TOPS ~312 TOPS >100×
Energy Efficiency 6.64×10² TOPS/W ~1.6 TOPS/W >100×
Computing Density 2.62×10² TOPS/mm² ~0.4 TOPS/mm² >100×

Key Innovations

  1. 2.1+ Million Photonic Neurons - Integrated via 3D packaging in just 136.5 mm²
  2. Optical Latent Space (OLS) - All-optical dimension conversion using single-mode fiber arrays
  3. BOGT Training Algorithm - Bayes-based training independent of ground truth labels

Demonstrated Capabilities

  • ✅ High-resolution (512×512) semantic image generation
  • ✅ Image denoising with up to 20.4% noise reduction
  • ✅ Style transfer (Van Gogh, Malevich, mosaic styles)
  • ✅ 3D generation and semantic manipulation
  • ✅ Video generation

About This Web Application

This interactive explorer helps you understand:

📖 Paper Overview

Summary of key findings, performance metrics, and comparison charts

🏗️ Architecture

3D visualization of the encoder → OLS → generator pipeline with animated light propagation

⚛️ Physics Simulation

Interactive photon simulation through diffractive metasurface layers with adjustable:

  • Wavelength (400-700nm)
  • Layer spacing
  • Phase modulation

🔧 Manufacturing

Step-by-step fabrication process from digital training to 3D integration, with cost analysis

🌙 Night Vision Application

Explore how optical AI could enable ultra-low-latency, low-power night vision goggles

🏥 Medical Imaging Application

Interactive medical image enhancement with contrast, noise reduction, and edge enhancement controls

🚗 Autonomous Systems Application

Visualize the critical importance of processing latency for self-driving vehicles

📊 Parameter Explorer

Adjust system parameters and see computed performance metrics in real-time with 3D surface plots


Technologies Used

  • Three.js - 3D graphics and physics simulations
  • Chart.js - Interactive data visualizations
  • MathJax - Mathematical equation rendering
  • Vanilla JavaScript - No framework dependencies

Running Locally

# Clone the repository
git clone https://github.com/yourusername/repo-name.git
cd repo-name

# Start a local server (Python 3)
python3 -m http.server 8888

# Or with Node.js
npx serve .

Then open http://localhost:8888 in your browser.


Deploying to GitHub Pages

  1. Push this repository to GitHub
  2. Go to SettingsPages
  3. Under "Source", select Deploy from a branch
  4. Choose main branch and / (root) folder
  5. Click Save

Your site will be live at https://yourusername.github.io/repo-name/


File Structure

├── index.html      # Main HTML structure with 8 tabs
├── styles.css      # Dark theme styling
├── app.js          # Three.js visualizations & Chart.js graphs
├── README.md       # This file
└── science.adv7434.md   # Full paper content in markdown

Mathematical Formulations

The app includes key equations from optical computing:

Angular Spectrum Propagation: $$E(x,y,z) = \mathcal{F}^{-1}\left{ \mathcal{F}{E(x,y,0)} \cdot e^{i k_z z} \right}$$

Phase Modulation: $$E_{out}(x,y) = E_{in}(x,y) \cdot e^{i\phi(x,y)}$$

BOGT Training Loss: $$\mathcal{L} = D_{KL}(Q(Z|X) | P(Z))$$

Diffraction Limit: $$d_{min} = \frac{\lambda}{2 \cdot NA}$$


Future Possibilities

The LightGen architecture opens doors to:

  • Fully analog optical systems - No digital conversion (e.g., optical night vision goggles)
  • Edge AI - Ultra-low power inference on mobile devices
  • Real-time medical imaging - Zero-latency image enhancement during surgery
  • Autonomous vehicles - Sub-microsecond scene understanding

References

  1. Chen, Y. et al. Science 390, 1259-1265 (2025)
  2. Wetzstein, G. et al. Nature 588, 39-47 (2020) - Photonic computing review
  3. Shen, Y. et al. Nat. Photonics 11, 441-446 (2017) - MZI computing
  4. Mildenhall, B. et al. Commun. ACM 65, 99-106 (2021) - NeRF

License

This educational tool is provided for learning purposes. The original research is published in Science and is subject to their licensing terms.


Built to explore the future of AI computing at the speed of light

Preview

Project screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors