Skip to main content
Nature Communications logoLink to Nature Communications
. 2026 Aug 19;17:9902. doi: 10.1038/s41467-026-76714-x

MOCLIP: a foundation model for large-scale nanophotonic inverse design

Sergei Rodionov 1,#, Arturo Burguete-Lopez 1,#, Maksim Makarenko 1, Qizhou Wang 1, Fedor Getman 1, Andrea Fratalocchi 1,✉
PMCID: PMC13582829  PMID: 42749714

Abstract

Foundation models are transforming artificial intelligence by enabling generalizable, data-efficient solutions across diverse domains and applications. However, the lack of large and diverse datasets remains a key barrier to their development in nanophotonics. This work presents MOCLIP (Metasurface Optics Contrastive Learning Pretrained), a nanophotonic foundation model that encodes metasurfaces’ structural and spectral information into a shared latent space via contrastive learning, using an experimentally acquired dataset with sample density approaching the scale of ImageNet-1K. The study demonstrates MOCLIP’s inverse design capabilities, including high-throughput zero-shot prediction at 2 ⋅ 105 samples per second, full-wafer design of an entire 4-inch substrate in minutes, and latent space optimization reaching 95% accuracy. This work further introduces an optical information storage concept that leverages MOCLIP to achieve a storage density of 0.1 Gbit/mm2 at the resolution limit, surpassing commercial optical media by a factor of six. Together, these results position MOCLIP as a scalable, versatile platform for next-generation photonic design and data-driven applications.

Subject terms: Metamaterials, Computer science


The foundation model MOCLIP brings large-scale AI to nanophotonics. Trained on experimental wafer scale data, it designs metasurfaces at 200,000 samples per second with over 95% accuracy, enabling optical memory six times denser than commercial ones.

Introduction

Deep learning has rapidly permeated nanophotonic inverse design, enabling advances in metasurfaces1–7, photonic crystals8, plasmonics9–11, and photonic integrated circuits12. Beyond design, deep learning is fundamentally reshaping how optical information is processed and utilized, unlocking applications spanning Tb/s hyperspectral video understanding13, computational imaging14, and optical sensing15. These developments reflect a broader trend of integrating increasingly powerful artificial intelligence (AI) paradigms into photonics3,16,17. Foundation models (FMs) are at the forefront of this trend18–20. FMs are large-scale models trained in a self-supervised manner on broad data that adapt to a wide range of downstream tasks; they span architectures that include large language models (LLMs), multi-modal systems, and domain-specific designs21,22. Unlike bespoke, task-specific deep learning pipelines, FMs leverage large and diverse datasets to learn universal representations that generalize across tasks and domains, enabling capabilities such as zero-shot inference and cross-domain transfer. This generalized approach is driving innovation across machine vision23, medical diagnosis24–26, climate modeling27, material chemistry28,29, and robotics30. In nanophotonics, FMs could transform inverse design by learning unified representations that generalize across devices, enabling automated design and data-driven analysis of increasingly complex nanophotonic architectures3.

A primary hurdle to implementing FMs in nanophotonics is their considerable training data demands31. Robust generalization performance requires high dataset variability, quantified by the number of degrees of freedom (DOFs) of the nanostructures32–34, or alternatively by the intrinsic dimension (ID) of the data manifold34,35. The relationship between the dataset size N required to train a deep learning model efficiently and the DOFs d follows the power law N = kdα, where k is a constant and α ranges approximately between 0.1 and 2 depending on the modality and task33,36–38. Fig. 1 compares state-of-the-art nanophotonic and computer vision datasets by size and DOF, revealing a substantial gap between them. Computer vision datasets, such as ImageNet–1K, used to train large-scale FM transformers, exhibit DOFs of approximately 40, yielding a density of 30,000 samples per DOF33. In contrast, nanophotonic datasets typically have fewer than 10 DOFs and contain about 10 to 1000 samples per DOF39–45, resulting in sample densities per DOF that fall orders of magnitude below the data densities required for FM training20. A major difficulty in increasing the scale and diversity of nanophotonic datasets arises from their dependence on computationally intensive electrodynamic simulations1,31 based on either first principles solvers such as finite-difference time-domain (FDTD) or the finite element method, or semi-analytic techniques like rigorous coupled-wave analysis. For example, such simulations based on FDTD with a 5 nm mesh size and a unit-cell period of 500 nm yield approximately one sample per minute, even when conducted on high-performance computing platforms46. Beyond their slow data generation rate, simulations often fail to accurately capture real material properties and structural imperfections, and rarely account for response deviations from the plane-wave approximation6,31,47, limiting the generalization of deep learning models trained on simulated data.

Fig. 1. State-of-the-art nanophotonic and computer vision datasets.

Fig. 1

Dataset size versus degrees of freedom (DOFs), illustrating empirical scaling trends. Orange markers represent nanophotonic datasets, blue markers represent computer vision datasets, and this work is indicated by a red marker. Computer vision dataset sizes and DOFs are taken from ref. 33. The scaling law is described by the equation N = kdα, with fitted parameters α = 1.72 and k = 442.

This work introduces the Metasurface Optics Contrastive Learning Pretrained (MOCLIP) framework for nanophotonic broadband amplitude inverse design. MOCLIP builds on the Contrastive Language-Image Pretrained (CLIP) FM48, a backbone of widely adopted generative systems such as Stable Diffusion49, generalizing it to the domain of nanophotonics by leveraging its ability to align multi-modal representations within a shared latent space. MOCLIP provides a unified latent space for metasurface geometries and their spectral responses, enabling both spectrum-to-geometry retrieval (inverse design) and geometry-to-spectrum retrieval (spectrum prediction)50 within a single framework via latent space search or optimization.

MOCLIP is pretrained on broadband spectral amplitude data, whose inverse design constitutes a major open problem of this area, at the center of significant research efforts1,51,52. Addressing this issue opens a wide range of applications, including but not limited to structural color and color-printing metasurfaces53, perfect absorbers54, single-shot polarimetric imaging via dichroic metasurfaces55, display-oriented spectral filters56, compact hyperspectral imaging13,57, humidity-responsive structural color pixels58, biosensors59,60, and temperature sensors61.

MOCLIP undergoes training entirely on experimental data, without relying on computer simulations, using a dataset generation strategy that combines dense wafer-scale fabrication with automated hyperspectral measurements. This pipeline enables the fabrication of around 40 samples per minute and optical characterization at a rate of 380 samples per minute. The model uses more than 11,000 samples per DOF, approaching the scale of ImageNet-1K and exceeding the sample density of the majority of state-of-the-art computer vision datasets. This work showcases different applications of MOCLIP, including two complementary inverse design modalities: large-scale zero-shot prediction at a rate of 2 × 105 samples per second and latent space optimization for high-fidelity inverse design with over 95% accuracy, as well as a proof-of-concept optical information storage technology with information density up to 0.1 Gbit/mm2, surpassing the information density of commercial optical storage media by a factor of six62.

Results

Figure 2 summarizes MOCLIP’s dataset generation, high-level architecture, and applications. Dataset generation starts by constructing a library of free-form metasurface geometries assembled from shape primitives: ellipses, rectangles, and rings (Fig. 2a). Subsequent fabrication transfers these designs into silicon-on-glass metasurfaces, accommodating thousands of distinct geometries on a single substrate. A custom automated hyperspectral transmission microscope measures each metasurface (Fig. 2b). Figure 2c illustrates the measurement results, comprising spectral responses for each metasurface geometry. The union of all geometries and their corresponding spectral responses forms MOCLIP’s training dataset.

Fig. 2. MOCLIP concept.

Fig. 2

a Dataset of randomly generated free-form metasurface geometries. b Experimental realization and characterization of the designs using an automated hyperspectral microscope. c Dataset of measured spectra corresponding to the free-form metasurface designs. d Encoding of experimental metasurface spectral responses. e Encoding of metasurface geometries. f Shared latent space for spectral and geometric information. g Zero-shot prediction for inverse design (left) and spectra prediction (right). h Latent space optimization for inverse design (left) and spectra prediction (right). i Optical information storage via physical implementation of latent space information.

Following the CLIP FM architecture, the framework trains two distinct encoders on input data pairs comprising experimental spectral response curves and binary geometry images (Fig. 2d, e). MOCLIP uses a multilayer perceptron (MLP) for the spectral response curves and a convolutional neural network (CNN) for the geometry images. The model projects the encoders’ outputs into a shared low-dimensional latent space (Fig. 2f). MOCLIP’s training aligns the latent vectors of matching geometry (A) and spectrum (B) pairs by maximizing the cosine similarity SC between their latent vectors, while simultaneously minimizing the similarity between all non-matching (off-diagonal) pairs:

SC(A,B)=A⋅B∣∣A∣∣∣∣B∣∣ 1

Once trained, MOCLIP generalizes to a broad range of applications in broadband amplitude inverse design, including zero-shot prediction, latent space optimization, and automated optical information encoding and storage, all with little to no additional fine-tuning (Fig. 2g–i).

Dataset generation

Dataset generation starts with a stochastic algorithm that combines shape primitives to generate free-form design geometries (see “Methods”). The generation algorithm enforces dimensional limits and verifies element placement to ensure compliance with fabrication process tolerances. Metasurface fabrication involves electron beam lithography patterning of amorphous silicon layers on fused silica substrates (see “Methods”). Fig.3a shows all the fabricated samples used for measurements and dataset collection. There are 8 substrates in the picture, each holding 6 metasurface arrays visible as individual chips. Every metasurface array comprises 22,755 individual metasurfaces of size 6 μm × 6 μm, totaling 136,530 metasurfaces per substrate. In total, we fabricated and measured 136,530 × 8 = 1,092,240 metasurfaces, half of which are unique and the other half exact replicas (see Supplementary Note 1). The replicated dataset accounts for fabrication artifacts, contamination, and crosstalk from neighboring structures. Figures 3b–d present scanning electron microscope (SEM) images of representative fabricated metasurface arrays of different geometries. Quality assessment involves fabricating a companion 10 × 10 metasurface array containing randomly sampled entries for each of the 24 arrays (see Supplementary Note 3). SEM characterization of these companion arrays reveals a mean size difference of 4 nm and a standard deviation of 10nm between the fabricated structures and their designs across all dataset metasurfaces.

Fig. 3. Dataset generation.

Fig. 3

a A set of fabricated samples, each carrying six metasurface arrays of amorphous silicon on a fused-silica substrate, totaling 136 530 dataset samples per substrate. b–d SEM images of the fabricated metasurface arrays. e Hyperspectral transmission microscopy setup. f Spatial and spectral data hypercube of a metasurface array under fixed polarization conditions, shown in false colors for visualization. g Expanded view of the metasurface array under broadband illumination. h Example spectra extracted from the pixels of a single metasurface pad for x- and y-polarized illumination (green and violet sets of curves) and average pixel responses (black and yellow curves).

Figure 3e illustrates the hyperspectral transmission microscope setup (see Supplementary Note 2) for characterizing the metasurfaces’ optical responses. Light from a broadband source (LS) passes through a collimating lens (L), a polarizer (POL), and a tunable filter (TF), forming a monochromatic beam of tunable wavelength and controlled linear polarization. A half-wave plate (HWP) controls the polarization of the filter output, after which a series of mirrors (M) and lenses direct the beam through the microscope’s aperture and field stops (AS, FS), focusing it onto the back focal plane of an objective (OBJ) to illuminate the sample with Köhler illumination. A second objective and a tube lens (TL) collect the transmitted light and image the sample onto a camera (CAM). Simultaneously, a beam splitter (BS) diverts a portion of the beam to a reference camera (RCAM), which monitors and compensates for intensity fluctuations.

For every array, the setup records two stacks of narrow-band images by driving the TF from 450nm to 730nm in 10nm increments at its minimum bandwidth setting (10nm) for x and y polarizations, generating two hypercubes per array. Supplementary Notes 2 and 3 provide details on the setup components and measurement error analysis. Figure 3f shows a representative hyperspectral datacube acquired from a single metasurface array under fixed polarization conditions. False colors enhance visualization, with the dark rectangular region at the center corresponding to the spatial footprint of the array. Figure 3g provides an expanded view of the metasurface array under broadband illumination, showing the spectral response of each metasurface as distinct colors captured by a conventional red, green, and blue (RGB) camera. Figure 3h depicts the response of a typical metasurface computed from the hypercube’s pixel values. The green and violet lines represent readings obtained from all pixels covering a single metasurface in the x and y polarization hypercubes, while the black and yellow lines show the averaged pixel responses used as dataset entries. Cross-validation of every metasurface spectrum with its corresponding duplicate in the replicated dataset ensures quality by discarding entries with a mean-squared error (MSE) exceeding 10−3 value, resulting in a dataset of 466 537 unique metasurface geometry-spectrum pairs.

MOCLIP training

Figure 4 illustrates MOCLIP’s training process. The pipeline follows a bimodal contrastive learning approach, simultaneously training two encoders to project their outputs into a shared latent space. Figures 4a–c show the geometry encoding process. Binary metasurface geometry images (Fig. 4a) are processed by the geometry encoder (Fig. 4b), which uses a CNN based on the ResNet architecture63 to generate a latent vector Pn for each geometry Gn, where n is a sample index (Fig. 4c). Each vector Pn is M-dimensional, where M is a hyperparameter determined through systematic optimization to identify the optimal dimensionality of MOCLIP’s latent space, yielding M = 64.

Fig. 4. MOCLIP training.

Fig. 4

a Representation of geometrical metasurface information as 128 × 128 binary images with period and thickness parameters. b Geometry encoder, comprising a CNN architecture. c 64-dimensional latent vectors produced by the geometry encoder. d Spectral information represented by two 29-dimensional vectors for x- and y-polarizations (blue and orange curves, respectively). e Spectra encoder based on an MLP architecture. f 64-dimensional latent vectors produced by the spectra encoder. g Similarity matrix containing pairwise dot products between latent vectors from both modalities. Yellow entries correspond to matching geometry-spectra pairs trained to have similarity values close to 1, with the rest indicating non-matching pairs trained to approach zero.

Figures 4d–f show the spectral information encoding process. The encoding process begins by concatenating the two polarization responses for each metasurface into a single vector Sn (Fig. 4d). These vectors are fed into the spectra encoder (Fig. 4e), which uses an MLP architecture to produce the corresponding latent vectors Cn (Fig. 4f). Supplementary Note 4 provides additional information on the MOCLIP architecture.

Figure 4g shows the similarity matrix obtained by computing the pairwise cosine similarities SC between the normalized latent vectors from the geometry and spectra input modalities. The cross-entropy loss64 between the similarity matrix and an identity matrix enforces contrastive learning by promoting the alignment of matching pairs while penalizing mismatches. The “Methods” section provides additional details on the training process.

Zero-shot prediction

In deep learning, zero-shot prediction refers to a model’s ability to make meaningful predictions for inputs or tasks not explicitly represented during training. This capability arises from leveraging a shared latent space that preserves semantic relationships. For example, a CLIP model trained on photographs can accurately classify stylized drawings of the same subjects48,65. This capability is a defining feature of FMs, enabling reduced annotation costs and turnaround times, sustained functionality in open-world settings where new concepts can emerge, and applicability to long-tail use cases with scarce examples66. MOCLIP delivers zero-shot nanophotonic inverse design capabilities, enabling rapid identification of candidate metasurface geometries that can match a previously unseen target spectral response.

Figures 5a–c illustrate MOCLIP’s zero-shot prediction process. The process starts by encoding the target spectrum St with the spectra encoder to produce its latent vector Ct (Fig. 5a). Next, MOCLIP generates a set of probe geometries Gn (Fig. 5b) and encodes each through the geometry encoder to obtain their corresponding latent vectors Pn. Probe geometries can be any collection of candidates, such as randomly generated free-form shapes or a pre-existing library. By computing the cosine similarity between the spectrum’s latent vector and each of the probe geometries’ latent vectors, MOCLIP generates a similarity score for each probe geometry, indicating how closely it matches the target spectrum (Fig. 5c). MOCLIP then selects the highest-scoring geometry (Fig. 5c, yellow cell) as its prediction.

Fig. 5. Zero-shot prediction.

Fig. 5

a Target spectrum encoding into a latent vector, where the x- and y-polarizations are represented by blue and orange curves, respectively. b Encoding of probe geometries, including the ground truth one, into latent vectors. c Similarity score vector between the target spectrum and the candidate geometry latent vectors. The yellow cell indicates the best matching score for the predicted geometry. d Top-k accuracy for the test dataset. e Statistical distribution of the MSE between the target spectrum and measured spectra of the predicted geometries as a function of the number of probe geometries. Shaded bands indicate quantile regions---green for <Q25, blue for Q25--Q75 and red for Q75--Q95; the solid blue line indicates the mean.

We evaluate MOCLIP’s zero-shot performance by calculating the Top-k retrieval accuracy, a standard metric for evaluating retrieval performance in FMs67. This metric quantifies the proportion of queries in which a model retrieves the correct match within the first k candidates of a ranked retrieval list. Figure 5d reports MOCLIP’s Top-k retrieval accuracy for k ranging from 1 to 20 evaluated on a test set of 46653 samples (see “Methods”). For each target spectrum in the test set, the model retrieves the top k most similar geometries from the test set, based on the cosine similarity of the latent vectors. MOCLIP achieves Top-1, Top-5, and Top-10 retrieval accuracies of nearly 75%, 95%, and 98%, respectively. In an analogous text-to-image multi-modal retrieval task, the original CLIP model achieves Top–1, Top–5, and Top–10 accuracies of 68.7%, 90.6%, and 95.2% on the Flickr30k dataset, and 37.8%, 62.4%, and 72.2% on the MS-COCO 5k test set, respectively48. A similar evaluation in the materials science domain (predicting crystalline structure from the density of states) reports Top–1, Top–5, and Top–10 retrieval accuracies of approximately 40%, 75%, and 85%, respectively68.

MOCLIP’s zero-shot prediction offers substantially higher throughput than conventional inverse design approaches. Starting from a prepared probe set of candidate geometries generated using the same algorithm as during dataset creation, MOCLIP encodes each candidate geometry into a latent vector using the geometry encoder (Fig. 5b). This process yields a probe database comprising metasurface geometries and their latent vectors at a throughput exceeding 7000 designs per second for database construction, after which the database supports inverse design inference at a rate exceeding 109 probe geometries per second. A key advantage of this approach is that the probe geometries can be customized and filtered during the initial database generation stage, allowing direct incorporation of fabrication tolerances or application-specific constraints without any modifications to the model architecture or retraining.

We evaluated the model’s zero-shot prediction accuracy by comparing experimentally acquired spectra of MOCLIP’s predicted geometries against target spectra. We conducted the error analysis on the test dataset and visualized in Fig. 5e the statistical distribution of MSE between 10,000 randomly sampled target spectra and their MOCLIP-predicted counterparts using varying probe database sizes. The shaded regions indicate quantile bands: below the 25th percentile (green), between the 25th and 75th percentiles (blue), and between the 75th and 95th percentiles (red). When the probe database size exceeds 104 samples, 95% of predictions achieve an MSE < 10−2, establishing a 10% transmission deviation as an upper bound for reliable inverse design50. At this database size and accuracy level, MOCLIP achieves an inverse design throughput of one high-fidelity solution every 5 μs, representing a 102 × speedup over convolutional generative adversarial network (cGAN) models41 and a 106 × speedup over state-of-the-art diffusion-based inverse design models69. As a practical demonstration, MOCLIP completes the inverse design of an entire 4-inch wafer filled with 5 μm square metasurfaces in 20 min, a task that would typically require weeks or months at this metasurface density and resolution using state-of-the-art approaches.

MOCLIP’s symmetric treatment of metasurface geometries and their spectra enables zero-shot prediction of spectral responses from target geometries, effectively framing spectrum prediction as a cross-modal retrieval task. Using a database of experimentally measured spectral responses, MOCLIP replaces time-consuming electrodynamic simulations with fast zero-shot predictions, achieving speedups of up to 107 (see Supplementary Note 5), while drawing on experimentally validated data. This approach achieves an accuracy comparable to that of MOCLIP’s inverse design task. Supplementary Note 5 details the zero-shot spectrum prediction pipeline and reports the corresponding performance metrics.

Library search

One of the most straightforward and widely used approaches for metasurface inverse design is library search1,46. In this framework, a generated database of metasurface geometries and their corresponding optical responses serves as a search space for the inverse design. Given a target optical response, we obtain the inverse-design solution by selecting the library entry whose response most closely matches the target according to a chosen similarity metric, such as MSE. Although this approach is conceptually simple and can provide highly accurate matches within the sampled database, it remains fundamentally limited by its discrete nature: it does not naturally support reliable interpolation in high-dimensional parameter spaces, and retrieving the best match directly in the original spectral space can be inefficient for large libraries1,17. MOCLIP’s zero-shot prediction capability addresses these limitations by enabling faster retrieval and continuous interpolation between neighboring geometries in the learned latent space.

To compare conventional library-based search with MOCLIP-based retrieval, we first generated a set of custom polarization-resolved transmission spectra corresponding to ideal broadband color filters, neutral-density filters, and polarizers (see Supplementary Note 7). In addition, to ensure a fair comparison, we precomputed latent vectors for all geometries in the database following the procedure described in the zero-shot prediction section. For each custom target spectrum, we then searched the database for the closest match by comparing the target either directly with library spectra in the original spectral space or with library geometries in the learned latent space. Specifically, we considered three retrieval strategies: MSE-based search in the original spectral space, Top-1 cosine-similarity search in the latent space, and Top-1 cosine-similarity search in the original spectral space. We included the last strategy to isolate the effect of the similarity metric from that of the representation space, thereby enabling a direct comparison between MSE- and cosine-similarity-based retrieval. For each method, we recorded the inference time per target and the distribution of reconstruction errors across all target spectra, summarized by the median MSE and the 25th and 75th percentiles.

Figure 6a shows the library search speed benchmark for the three retrieval strategies described above. Each marker indicates the median MSE across all target spectra, while the error bars denote the 25th and 75th percentiles. The blue markers correspond to conventional MSE-based library search evaluated on progressively larger fractions of the full database (10%, 25%, 50%, and 100%). When applied to the full database, conventional MSE-based retrieval requires 23 ms per target, with the MSE range between the 25th and 75th percentiles spanning from 1.05 × 10−3 to 2.05 × 10−3. The red star denotes MOCLIP-based retrieval in the latent space, where cosine similarity is computed between the latent vector of the target spectrum and the latent vectors of all geometries in the database. Relative to the full-database MSE search, it achieves more than a 10 × reduction in inference time, reaching 1.67 ms per target, while maintaining a comparable accuracy range of 1.09 × 10−3 to 2.15 × 10−3. In contrast, Top-1 cosine-similarity search in the original spectral space (green marker) yields a similar inference time of 1.8 ms per target, which is within measurement uncertainty of the MOCLIP runtime, but substantially lower retrieval accuracy, with the MSE range increasing to 1.4 × 10−3 to 6.6 × 10−3. These results show that MOCLIP-based retrieval preserves the accuracy of conventional MSE-based library search while reducing the computational cost by more than an order of magnitude, highlighting the advantage of performing retrieval in the learned latent space rather than directly in the original spectral space.

Fig. 6. Library search.

Fig. 6

a Speed benchmark comparing exact MSE search (blue markers), spectra similarity search (green marker), and MOCLIP latent-vector search (red star). b Two-dimensional visualization of the geometry latent space showing the top-50 library geometries (black circles) and their nearest-neighbor variations (blue dots for low similarity, orange dots for moderate similarity and green dots for high similarity). Magenta and red markers indicate the start and end anchors for interpolation, respectively. c Start and end anchor geometries selected from the top-50 library candidates, together with the interpolated geometry variants. d Experimental spectra for the anchor geometries (first and last columns) and simulated spectra for the interpolated geometries (solid lines), compared against the target spectrum (dashed lines).

Supplementary Note 9 discusses scaling times of MOCLIP latent space compared to direct library search with and without nearest neighbor acceleration. For databases of sizes 107, 108, and 109, latent space retrieval is 6–14 times faster while preserving full accuracy in the results. Beyond runtime considerations, a key advantage of MOCLIP is the ability to identify accurate inverse-design solutions for targets that lie outside the sampled library, which conventional library search cannot address by construction.

Figures 6b–d further show that MOCLIP supports continuous interpolation between neighboring metasurface geometries in the shared latent space. To illustrate this behavior, we randomly selected one target spectrum (Fig. 6d, blue dashed line). We analyzed the local arrangement of its nearest library matches together with the interpolated geometries between them in the latent space. To this end, we applied principal component analysis to the full set of geometry latent vectors. We projected them onto a two-dimensional space (PC1 and PC2) to visualize the latent-space structure (Fig. 6b). We then identified the Top-50 library matches for the selected target spectrum and located their corresponding geometry latent vectors within this projection (Fig. 6b, black rings). As the library geometries occupy only discrete locations in the latent space, we filled the surrounding region by generating 10,000 geometries through small random perturbations of the Top-50 geometry candidates and coloring them according to their cosine similarity to the target spectrum: green denotes similarity comparable to the library matches, orange denotes lower but still acceptable similarity, and blue denotes substantially lower similarity corresponding to poor candidates (Fig. 6b). The visualization shows that cosine similarity defines a local trust region in the latent space (Fig. 6b, green area), where interpolation identifies suitable candidates for inverse design, including potentially better solutions than the original library matches, while effectively excluding poor candidates. For demonstration purposes, we selected two library points in the 2D projection (Fig. 6b, start and end anchors), connected them by a black dashed line, and extracted four geometries located along this line (Fig. 6b, cyan markers), which are shown in Fig. 6c. We additionally compared their spectra with the target spectrum in Fig. 6d, where we computed spectra of the interpolated geometries using FDTD. Together, these results show that MOCLIP’s latent space supports physically meaningful interpolation between neighboring library geometries, extending the conventional discrete library search into a continuous local design space.

Design by latent space optimization

Beyond zero-shot prediction, MOCLIP’s shared latent space enables an alternative inverse design strategy that performs optimization directly over latent vectors. This approach replaces time-intensive electrodynamic simulations of probe geometries1,2 with rapid inference through the geometry encoder. It substitutes a traditional spectrum-matching loss with a similarity-based loss computed between the latent vectors of the target spectrum and candidate geometries. While zero-shot prediction prioritizes high-throughput design generation, latent space optimization emphasizes high-fidelity solutions.

Figures 7a–e illustrate the optimization pipeline. The procedure begins by passing the target spectrum St through the spectra encoder, resulting in its corresponding latent vector Ct (Fig. 7a). Simultaneously, the geometry encoder processes a probe geometry Gn to produce its latent vector Pn (Fig. 7b). The same geometry generator used during the dataset creation produces these probe geometry candidates (Fig. 7c). The optimization routine maximizes the similarity score Ct ⋅ Pn by applying particle swarm optimization (PSO)70 (Fig. 7d) to search the generator’s parameter space for the optimal geometry. This optimization continues until the algorithm finds a probe geometry whose latent representation closely matches that of the target spectrum, resulting in an optimized geometry Gf (Fig. 7e).

Fig. 7. Latent space optimization.

Fig. 7

a Target spectrum encoding into a latent-space vector, where the x- and y-polarizations are represented by blue and orange curves, respectively. b Intermediate geometry prediction encoding into a latent-space vector. c Geometry generator with trainable parameters. d Optimizer for the geometry generator. e Optimized geometry prediction. f Optimization accuracy quantified by the statistical distribution of the MSE between the target and predicted spectra as a function of the number of iterations. Shaded bands indicate quantile regions—green for <Q25, blue for Q25–Q75 and red for Q75–Q95; the solid blue line indicates the mean; dashed curves indicate quantile lines for the library-based search approach on the whole dataset—green for Q25, blue for Q75 and red for Q95; the black solid curve indicates the mean value for the library search.

Figure 7f presents the performance of latent-space optimization inverse design, evaluated on 500 custom target spectra previously used for library search analysis (see Supplementary Note 7). The plot shows the statistical distribution of the MSE between the target and FDTD-simulated spectra of the predicted geometries (see “Methods”) as a function of the number of PSO iterations. Shaded regions denote quantile bands, while dashed lines indicate the corresponding quantiles from the library search as stationary reference values.

The process begins with 200 randomly generated probe geometries. While library search yields better results during the initial iterations (<5), the optimization approach surpasses the library’s performance at the 25th percentile (Q25) by the fifth iteration, improving on the most accurate library-retrieved candidates. By the 15th iteration, the optimization exceeds library performance in both mean MSE and the 75th percentile (Q75), suggesting superior refinement of typical ("median-accuracy") results. Beyond 50 iterations, the approach outperforms the library search even at the 95th percentile (Q95), demonstrating its efficacy for the most challenging target candidates. After 200 iterations, the Q95 MSE reaches 2.5 × 10−3, achieving results that are competitive with, and in some cases superior to, current state-of-the-art models41,43. Fig. 8 provides representative examples of the inverse-designed geometries obtained through latent space optimization and comparisons between their FDTD-simulated spectra and the corresponding target spectra. Supplementary Note 8 presents additional experimental validation. Supplementary Table 1 compares MOCLIP against recent metasurface inverse design frameworks. Compared to published methods, MOCLIP achieves the lowest average MSE of 1.1 × 10−3 with the fastest inference time of 500 ms while operating over the largest DoF space (42 DoFs). Optimization proceeds without forward solver calls, achieving convergence within 50 PSO iterations.

Fig. 8. Latent space optimization results.

Fig. 8

a Examples of geometries predicted by the latent space optimization. b Comparison between the target spectra (blue dashed lines) and simulated spectra (orange solid lines) for the predicted geometries.

Information storage

Metasurfaces provide a durable medium for long-term optical information storage. By exploiting the structural DOFs to manipulate optical responses across the continuous spectrum, metasurfaces enable data encoding at densities beyond binary representations71. A central challenge in such systems is retrieving the encoded information from the measured optical response, which requires classifying overlapping spectral signatures that vary due to fabrication imperfections and measurement noise. In this context, Ref. 72 demonstrated that neural networks can reliably decode stored digital information from measured optical scattering spectra, achieving information densities of up to 9 bits per metasurface. However, unlike the readout process, the writing strategy still relies on multibit grid-based encoding. Here, MOCLIP extends this paradigm to a unified read-write framework by using a shared geometry-spectra latent space, enabling arbitrary information sequences to be encoded into free-form metasurface geometries and reliably recovered from their optical spectra, exploiting the design flexibility of free-form metasurfaces.

Figure 9a presents an overview of MOCLIP’s information storage concept. The central idea is to encode information into latent vectors that can subsequently be realized as metasurface geometries (writing process). To ensure a deterministic writing process, we leveraged the predefined candidate library provided by our dataset. We characterized the fabricated arrays using the hyperspectral transmission microscope (reading process), after which the measured transmission spectra were fed into the MOCLIP spectra encoder to obtain the latent vectors. These latent vectors are then quantized to recover the information stored in the metasurfaces.

Fig. 9. Optical storage based on latent space encoding.

Fig. 9

a General schematic of optical storage utilizing a metasurface structure’s latent space information. b Visualization of the distribution of latent vectors in their first 6 dimensions. c Vector quantization of the latent variables at the first 2 dimensions, where dots represent data points and red crosses are for codebook centroids. d Performance analysis on information density compared to DVD and Blu-ray disks. As the unit size of metasurface decreases, the theoretical density of MOCLIP optical storage outperforms Blu-ray.

Two principal error sources govern the capacity and reliability of information storage in this work: fabrication and measurement errors. Error analysis performed in Supplementary Note 3 jointly captures measurement and fabrication errors into three contributions: spatial averaging over neighboring camera pixels, spectral variations between duplicated structures, and camera noise. This combined error metric serves as the distortion value Di in the subsequent rate-distortion analysis.

A key requirement for latent-space information storage is that the learned representation admits an efficient quantization strategy. Figure 9b presents the distribution of variable values in the first six latent vector dimensions. We leverage Kolmogorov-Smirnov test (K-S test)73 to compare their distribution to a continuous Gaussian probability density function to better characterize and quantify the latent vectors. The resulting K-S score of 0.014 indicates that the 64-dimensional latent vectors closely approximate a Gaussian distribution. This finding guides the choice of a high-dimensional vector quantization (VQ) strategy, commonly adopted in modern LLM training74. The VQ maps the latent vectors to a discrete set of candidate vectors, namely codebook centroids, and iteratively refines them to minimize the distortion error during the mapping. Figure 9c exemplifies the VQ strategy applied to the first two dimensions S1, S2 of the latent space, where K-means clustering constructs the mapping and locates the codebook centroids. This example applies a bit depth of 2 to each dimension, resulting in a codebook size of K = 16.

Rate-distortion theory75 allows an exploration of the theoretical limit of MOCLIP’s storage capacity. Equation (2) calculates the latent space’s rate-distortion bound R, representing the maximum quantization bit depth applicable.

R=∑i12log2σi2Di,0<Di<σi2 2

Here, σi2 represents the variance of the latent dimension i. Calculating Di and σi on the metasurface spectra dataset results in a rate-distortion bound of R = 126. This value indicates that it is possible to encode a maximum of 126 bits of information into the 64-dimensional latent space of each metasurface. Figure 9d plots the information density of the proposed technology against the lateral unit size of square metasurfaces. In the current experimental realization, each metasurface has a 6 μm unit size, corresponding to an information density of 3.34 Mbit/mm2, nearly doubling that of DVD (Fig. 9d, red dashed line). However, reducing the metasurface sizes can yield orders of magnitude improvement of the information density. Fig. 9d shows that MOCLIP’s information storage density surpasses that of Blu-ray (purple dashed line) when the metasurface has a unit size below 3.5 μm. The theoretical upper bound of information density with the current setup results from repeating the preceding analysis for metasurface unit sizes down to the Rayleigh criterion diffraction limit, corresponding to 1.056 μm, and yields 107.85 Mbit/mm2.

Discussion

This work develops and implements MOCLIP, a framework for broadband amplitude inverse design that builds on the CLIP FM to learn a shared latent space for metasurface geometries and their corresponding spectra. The FM training pipeline leverages an experimentally generated dataset comprising 466,537 silicon-on-glass metasurface geometry-spectra pairs spanning 42 design DOFs. The MOCLIP dataset exceeds the size of the largest previously reported metasurface-spectra dataset by more than a factor of nine and increases the supported design complexity by nearly a factor of three. Moreover, as an experimentally acquired dataset, it naturally includes information that is typically missing from simulation-based datasets, such as fabrication tolerances and measurement uncertainties. The MOCLIP experimental workflow generates an entire dataset at a rate of around 35 structures per minute, making this approach over 30 times faster than strategies based on computational electrodynamic approaches performed on supercomputers46, and about 100 times higher in our own benchmark comparison (see “Methods”). Adopting state-of-the-art manufacturing techniques, such as immersion lithography76, can further increase this rate, enabling orders of magnitude improvements in generating robust and physically accurate datasets for nanophotonic FMs.

We demonstrate multiple applications of MOCLIP for inverse design via latent space optimization and zero-shot prediction. These capabilities surpass traditional reconstruction-based deep learning approaches in nanophotonics, offering up to six orders of magnitude faster inference and a tenfold improvement in accuracy41,69, while retaining high flexibility to incorporate fabrication-related design constraints. MOCLIP’s zero-shot prediction achieves inverse design at a speed of approximately 2 × 105 target spectra per second on a GPU while maintaining an MSE below 10−2, making wafer-scale, high-throughput inverse design feasible. In addition, in a CPU-based benchmark against direct library search, zero-shot prediction achieves an approximately tenfold higher throughput while preserving nearly the same accuracy. At the same time, when higher accuracy is required, MOCLIP further supports optimization-based inverse design in the learned latent space. In this regime, the method refines the initial zero-shot solutions and surpasses direct library search, reducing the Q95 MSE to 2.5 × 10−3 after 200 PSO iterations. This demonstrates that MOCLIP combines rapid large-scale screening with accurate continuous refinement within a single framework.

The present framework generalizes to phase information by conventional holography-based techniques77–79. The hyperspectral transmission microscope can be extended to a holographic configuration by introducing a reference arm of matched path length, enabling simultaneous retrieval of amplitude and phase across the full spectral range. On the software side, the network architecture and training pipeline remain unchanged, leveraging the proposed CLIP structure. Such modularity is a core advantage of CLIP-based models, which naturally support the incorporation of multiple input modalities within a shared latent space68.

We concluded this work by demonstrating an application of MOCLIP for optical information storage using a library-assisted latent vector encoding scheme. Our approach leverages the shared geometry-spectra latent space to encode information using a library of predefined candidate structures, with VQ employed to model the distribution of latent vectors and optimize the quantization strategy. With the current experimental realization, MOCLIP achieves an information density of 3.34 Mbit/mm2, comparing favorably to last-generation optical storage devices. This concept can be extended to outperform the state-of-the-art by shrinking the metasurface unit size, with a theoretical upper bound of 0.1 Gbit/mm2 at a metasurface unit size of 1.056 μm, set by the diffraction limit of the current optical system. Future work can generalize this idea to free-form design with continuous inverse mapping from arbitrary bit sequences, opening the path toward complete read/write optical storage operations.

Methods

Geometries generation

The generation algorithm uses a Python-based software tool that stochastically populates a square cell with a fixed lattice period with a user-specified number of primitives (rectangles, ellipses, and rings). For each primitive, the algorithm samples the center position and in-plane dimensions (for rings, both outer and inner dimensions), accepting the draw only if the feature lies entirely within the cell. To satisfy fabrication constraints, the algorithm enforces limits on each shape’s dimensions, the spacing between features, and the minimum feature size. It requires every shape dimension to be at least 100 nm, and the feature size and inter-feature gap to be no smaller than 50 nm. The software samples each design on a discrete grid with lattice periods of 300 nm, 400 nm, 500 nm and 600 nm and silicon thicknesses of 150 nm, 178 nm and 195 nm. To keep the design space within practical limits, it allows at most four primitives per unit cell, resulting in 42 independent geometric DOF. Within these bounds, the software generated 546,120 unique metasurface designs.

Fabrication

The process begins with cleaning a fused silica wafer using acetone and isopropyl alcohol, followed by the deposition of a uniform amorphous silicon layer via low-pressure chemical vapor deposition (LPCVD). The thickness of the silicon layer is precisely controlled using ellipsometry (UVISEL Plus, HORIBA). The wafer is then diced into 15 mm wide and 500 μm thick pieces to serve as base samples. A positive electron beam resist, AR-P 6200.04 (Allresist), is spin-coated on the samples at 6000 RPM for 60 s, followed by a bake on a hotplate for 90 s at 150 ∘C. Subsequently, a conductive polymer, AR-PC 5090.02 (Allresist), is spin-coated at 4000 RPM for 60 s and baked at 100 ∘C for 1 min. Metasurface patterns are written using a JEOL JBX-6300FS electron beam lithography system at 100kV. After patterning, the conductive polymer is removed by submerging the sample in deionized water for 60 s. The resist is developed using AR 600-546 (Allresist) for 60 s, followed by O-Xylene for 7 s to sharpen feature edges. A 22nm chromium layer is deposited via electron beam evaporation to form an etch mask. Unwanted chromium is lifted off by submerging the sample in AR 600-71 (Allresist) for 10 min, followed by 1 min of sonication. Reactive ion etching with a CHF3 and SF6 mixture is used to remove unprotected silicon and expose the underlying substrate. Finally, the chromium mask is removed by submerging the sample in a mixture of perchloric acid and ceric ammonium nitrate (TechniEtch Cr01, MicroChemicals) for 60 s.

Foundation model training

The dataset is divided into three subsets: training (373,230 samples; 80%), validation (46,654 samples; 10%), and test (46,653 samples; 10%). The model is trained exclusively on the training set, using the validation to monitor performance at the end of each epoch and guide model selection. The test set was reserved to evaluate the final model performance after the training. Within the full dataset, geometries contain 2 shapes in 70% of samples, 3 shapes in 20%, and 1 or 4 shapes in 5% each. Periods and shape types are distributed uniformly, and thickness is approximately uniform (33% ± 3% per bin). All samples were verified to be unique using hashing.

The model is trained for 140 epochs using a three-stage learning rate schedule: 1 × 10−4 for epochs 1–60, 5 × 10−5 for epochs 61–100, and 3 × 10−5 for epochs 101–140. Adam optimizer80 updates the model parameters. The network contains approximately 11.8 million trainable parameters. The Supplementary Materials further detail the model architecture. We trained the model with three different seed values and monitored Top-k accuracy on the validation set. The results showed less than 0.2% accuracy difference for the Top-1, Top-5, and Top-10 metrics, so we arbitrarily selected the first model. All training and evaluation are conducted on a workstation equipped with an AMD Ryzen Threadripper PRO 5955WX 16-core processor, 128 GB of RAM, and an NVIDIA GeForce RTX 4090 GPU.

Finite-difference time-domain validation and speed benchmark

To validate the inverse-design results from latent-space optimization, we performed full-wave FDTD simulations using our custom solver for the final geometries generated by the particle swarm optimizer. To minimize the impact of numerical error on this validation, we first assessed spectral convergence with respect to grid resolution. Specifically, we computed the MSE between spectra obtained at different grid resolutions and a reference spectrum calculated with a 2.5 nm grid resolution (Fig. S3a). We also measured the computation time for each grid resolution (Fig. S3b). These benchmarks were performed on an HPE Cray EX system using 96 CPU cores. We defined one full simulation as the combination of a free-space reference simulation and a structure simulation for a single polarization state. The results indicate that a 5 nm grid resolution provides a suitable compromise between accuracy and computational cost: the corresponding error, MSE = 10−4, is one order of magnitude lower than the experimental measurement error and therefore has a negligible effect on the validation results. At this resolution, the computation time in our configuration was 3 min. Figure S3c compares the FDTD and experimental results, showing that the discrepancy remains within the measurement uncertainty.

Supplementary information

Acknowledgements

We performed the metasurface fabrication and scanning electron microscopy analysis at the KAUST Nanofabrication Core Lab and Imaging and Characterization Core Lab, respectively. We are grateful to the Core Labs staff for their consistent technical support, and we extend our special thanks to Dr. Camelia Florica for her essential assistance in the fabrication process optimization.

Author contributions

A.F. supervised the work. A.B.L., M.M., and F.G. conceptualized the idea and acquired preliminary results. S.R. developed the metasurface geometry generation algorithm and generated the dataset of metasurface geometries. S.R. and A.B.L. fabricated the samples, built the automated hyperspectral microscopy setup, and performed hyperspectral measurements. S.R. processed the hyperspectral measurement data and prepared the final dataset. S.R. and M.M. developed the MOCLIP model. S.R. trained and tested the model. S.R. developed the algorithms for zero-shot prediction, library-based search, and latent space-based optimization. Q.W. developed the information storage idea and performed memory capacity evaluation. S.R., A.B.L., Q.W., and A.F. wrote the manuscript.

Peer review

Peer review information

Nature Communications thanks Yihao Xu, Junsuk Rho and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.

Funding

The authors disclose support for the research of this work from the King Abdullah University of Science and Technology (KAUST) Baseline Grant [BAS/1/1628-01-01].

Data availability

A subset of the dataset comprising 10,000 samples is openly available in the GitHub repository at https://github.com/RodionovSA/MOCLIP_release and archived on Figshare81. The full dataset is available from the corresponding author upon request.

Code availability

The full source code used in this study is openly available in a GitHub repository at https://github.com/RodionovSA/MOCLIP_release and archived on Zenodo82.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Sergei Rodionov, Arturo Burguete-Lopez.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s41467-026-76714-x.

References

  • 1.Li, Z. et al. Empowering metasurfaces with inverse design: principles and applications. ACS Photonics9, 2178–2192 (2022). [Google Scholar]
  • 2.So, S. et al. Revisiting the design strategies for metasurfaces: fundamental physics, optimization, and beyond. Adv. Mater.35, 2206399 (2023). [DOI] [PubMed] [Google Scholar]
  • 3.Wang, Q. et al. The transformational dive of nanophotonics inverse design from deep learning to artificial general intelligence. APL Photonics9, 100902 (2024). [Google Scholar]
  • 4.Seo, J. et al. Deep-learning-driven end-to-end metalens imaging. Adv. Photonics6, 066002 (2024). [Google Scholar]
  • 5.Getman, F. et al. Broadband vectorial ultrathin optics with experimental efficiency up to 99% in the visible region via universal approximators. Light Sci. Appl.10, 47 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Wang, Q. et al. Advancing statistical learning and artificial intelligence in nanophotonics inverse design. Nanophotonics11, 2483–2505 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Yeung, C. et al. DeepAdjoint: an all-in-one photonic inverse design framework integrating data-driven machine learning with optimization algorithms. ACS Photonics10, 884–891 (2022). [Google Scholar]
  • 8.Deng, R. et al. Inverse design in photonic crystals. Nanophotonics13, 1219–1237 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.He, J. et al. Plasmonic nanoparticle simulations and inverse design using machine learning. Nanoscale11, 17444–17459 (2019). [DOI] [PubMed] [Google Scholar]
  • 10.Adibnia, E. et al. A deep learning method for empirical spectral prediction and inverse design of all-optical nonlinear plasmonic ring resonator switches. Sci. Rep.14, 5787 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Mahadi, M. K. et al. Gated recurrent unit (GRU)-based deep learning method for spectrum estimation and inverse modeling in plasmonic devices. Appl. Phys. A130, 784 (2024). [Google Scholar]
  • 12.MacLellan, B. et al. Inverse design of photonic systems. Laser Photonics Rev.18, 2300500 (2024). [Google Scholar]
  • 13.Makarenko, M. et al. Hardware-accelerated integrated optoelectronic platform towards real-time high-resolution hyperspectral video understanding. Nat. Commun.15, 7051 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Wang, Z. et al. Computational optical imaging: on the convergence of physical and digital layers. Optica12, 113–130 (2025). [Google Scholar]
  • 15.Al-Ashwal, N. H. et al. Deep learning for optical sensor applications: a review. Sensors23, 6486 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Ma, T. et al. OptoGPT: a foundation model for inverse design in optical multilayer thin film structures. Opto-Electron. Adv.7, 240062 (2024). [Google Scholar]
  • 17.Choi, M. et al. Realization of high-performance optical metasurfaces over a large area: a review from a design perspective. npj Nanophotonics1, 31 (2024). [Google Scholar]
  • 18.Liang, Y. et al. Foundation models for time series analysis: a tutorial and survey. In Proc. 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining 6555–6565 (ACM, 2024).
  • 19.Zhou, C. et al. A comprehensive survey on pretrained foundation models: a history from BERT to ChatGPT. Int. J. Mach. Learn. Cybern.16.12, 9851–9915 (2025). [Google Scholar]
  • 20.Fei, N. et al. Towards artificial general intelligence via a multimodal foundation model. Nat. Commun.13, 3094 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Bommasani, R. et al. On the opportunities and risks of foundation models. Preprint at https://arxiv.org/abs/2108.07258 (2021).
  • 22.Wiggins, W. & Tejani, A. S. On the opportunities and risks of foundation models for natural language processing in radiology. Radiol. Artif. Intell.4.4, e220119 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Awais, M. et al. Foundation models defining a new era in vision: a survey and outlook. IEEE Trans. Pattern Anal. Mach. Intell.47.4, 2245–2264 (2025). [DOI] [PubMed] [Google Scholar]
  • 24.Moor, M. et al. Foundation models for generalist medical artificial intelligence. Nature616, 259–265 (2023). [DOI] [PubMed] [Google Scholar]
  • 25.Zhou, Y. et al. A foundation model for generalizable disease detection from retinal images. Nature622, 156–163 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Wang, X. et al. A pathology foundation model for cancer diagnosis and prognosis prediction. Nature634, 970–978 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Nguyen, T. et al. ClimaX: a foundation model for weather and climate. In Proceedings of the 40th International Conference on Machine Learning (PMLR, 2023).
  • 28.Ahmad, W. et al. Chemberta-2: towards chemical foundation models. Preprint at https://arxiv.org/abs/2209.01712 (2022).
  • 29.Batatia, I. et al. A foundation model for atomistic materials chemistry. J. Chem. Phys.163, 184110 (2025). [DOI] [PubMed]
  • 30.Firoozi, R. et al. Foundation models in robotics: applications, challenges, and the future. Int. J. Robot. Res.44.5, 701–739 (2025). [Google Scholar]
  • 31.Kang, C. et al. Large-scale photonic inverse design: computational challenges and breakthroughs. Nanophotonics13.20, 3765–3792 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Huang, W. R. et al. Understanding generalization through visualizations. In Proc. 37th International Conference on Machine Learning (ICML) 87–97 (PMLR, 2020).
  • 33.Pope, P., Zhu, C., Abdelkader, A., Goldblum, M. & Goldstein, T. The intrinsic dimension of images and its impact on learning. In 9th International Conference on Learning Representations (ICLR) (2021).
  • 34.Gong, S., Boddeti, V. N. & Jain, A. K. On the intrinsic dimensionality of image representations. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 4716–4724 (IEEE, 2019).
  • 35.Camastra, F. & Staiano, A. Intrinsic dimension estimation: advances and open problems. Inf. Sci.328, 26–41 (2016). [Google Scholar]
  • 36.Sharma, U. & Kaplan, J. Scaling laws from the data manifold dimension. J. Mach. Learn. Res.23, 1–34 (2022). [Google Scholar]
  • 37.Hestness, J. et al. Deep learning scaling is predictable, empirically. Preprint at https://arxiv.org/abs/1712.00409 (2017).
  • 38.Cherti, M. et al. Reproducible scaling laws for contrastive language-image learning. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition 3607–3617 (IEEE, 2023).
  • 39.Grbcic, L. et al. Inverse design of photonic surfaces via multi fidelity ensemble framework and femtosecond laser processing. npj Comput. Mater.10, 1–10 (2024). [Google Scholar]
  • 40.Yao, T. et al. Inverse design of dispersion for photonic devices based on LSTM and gradient-free optimization algorithms hybridization. J. Opt. Soc. Am. B40, 1525–1532 (2023). [Google Scholar]
  • 41.Liu, Z., Zhu, D., Rodrigues, S. P., Lee, K.-T. & Cai, W. Generative model for the inverse design of metasurfaces. Nano Lett.18, 6570–6576 (2018). [DOI] [PubMed] [Google Scholar]
  • 42.Roberts, N. B. & Hedayati, M. K. A deep learning approach to the forward prediction and inverse design of plasmonic metasurface structural color. Appl. Phys. Lett.119, 061101 (2021). [Google Scholar]
  • 43.Wang, Y. et al. End-to-end diverse metasurface design and evaluation using an invertible neural network. Nanomaterials13, 2561 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Malkiel, I. et al. Plasmonic nanostructure design and characterization via deep learning. Light Sci. Appl.7, 60 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Clini de Souza, A. et al. Back–propagation optimization and multi–valued artificial neural networks for highly vivid structural color filter metasurfaces. Sci. Rep.13, 21352 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Li, Z. et al. Inverse design enables large-scale high-performance meta-optics reshaping virtual reality. Nat. Commun.13, 2409 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Yoon, G. & Rho, J. MAXIM: metasurfaces-oriented electromagnetic wave simulation software with intuitive graphical user interfaces. Comput. Phys. Commun.264, 107846 (2021). [Google Scholar]
  • 48.Radford, A. et al. Learning transferable visual models from natural language supervision. In Proc. 38th International Conference on Machine Learning (PMLR, 2021).
  • 49.Rombach, R., Blattmann, A., Lorenz, D., Esser, P. & Ommer, B. High-resolution image synthesis with latent diffusion models. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition 10684–10695 (IEEE, 2022).
  • 50.Chen, M. K., Zhu, L., Yang, C., Qiu, C.-W. & Tsai, D. P. Artificial intelligence in meta-optics. Chem. Rev.122, 15356–15413 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51.Kuznetsov, A. I. et al. Roadmap for optical metasurfaces. ACS Photonics11.3, 816–865 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Zeng, Y. et al. From performance to structure: a comprehensive survey of advanced metasurface design for next-generation imaging. npj Nanophotonics2.1, 39 (2025). [Google Scholar]
  • 53.Yang, W. et al. All-dielectric metasurface for high-performance structural color. Nat. Commun.11.1, 1864 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Rana, A. S. et al. Tungsten-based ultrathin absorber for visible regime. Sci. Rep.8.1, 2443 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Fan, Q. et al. Disordered metasurface enabled single-shot full-Stokes polarization imaging leveraging weak dichroism. Nat. Commun.14.1, 7180 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Smalley, J. S. T. et al. Subwavelength pixelated CMOS color sensors based on anti-Hermitian metasurface. Nat. Commun.11.1, 3916 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Lin, C.-H. et al. Metasurface-empowered snapshot hyperspectral imaging with convex/deep (CODE) small-data learning theory. Nat. Commun.14.1, 6979 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.Ko, B. et al. Humidity-responsive RGB-pixels via swelling of 3D nanoimprinted polyvinyl alcohol. Adv. Sci.10.2, 2204469 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Iwanaga, M., Hu, Q. & Tang, Y. Metasurface biosensors: status and prospects. Appl. Phys. Rev.12, 021305 (2025). [Google Scholar]
  • 60.Herkert, E. K. & Garcia-Parajo, M. F. Harnessing the power of plasmonics for in vitro and in vivo biosensing. ACS Photonics12.3, 1259–1275 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61.Zhao, J. et al. High-performance refractive index and temperature sensing based on toroidal dipole in all-dielectric metasurface. Sensors24.12, 3943 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62.Blu-ray Disc Association. White paper Blu-ray Disc format 1.C physical format specifications for BD-ROM. https://blu-raydisc.info/ (2010).
  • 63.He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 770–778 (IEEE, 2016).
  • 64.Bishop, C. M. Pattern Recognition and Machine Learning (Springer, 2016).
  • 65.Girdhar, R. et al. ImageBind: one embedding space to bind them all. In Proc. IEEE/CVF International Conference on Computer Vision (ICCV) (IEEE, 2023).
  • 66.Liu, F. et al. RemoteCLIP: a vision language foundation model for remote sensing. IEEE Trans. Geosci. Remote Sens.62, 1–16 (2024). [Google Scholar]
  • 67.Petersen, F., Kühne, H., Borgelt, C. & Deussen, O. Differentiable top-k classification learning. In Proc. 39th International Conference on Machine Learning (ICML) Vol. 162, 17656–17668 (PMLR, 2022).
  • 68.Moro, V. et al. Multimodal foundation models for material property prediction and discovery. Newton1, 100016 (2025).
  • 69.Zhu, L., Hua, W., Lv, C. & Liu, Y. Rapid inverse design of high degree of freedom meta–atoms based on the image–parameter diffusion model. J. Light. Technol.42, 5269–5278 (2024). [Google Scholar]
  • 70.Makarenko, M., Burguete-Lopez, A., Getman, F. & Fratalocchi, A. Robust and scalable flat-optics on flexible substrates via evolutionary neural networks. Adv. Intell. Syst.3, 2100105 (2021). [Google Scholar]
  • 71.Zijlstra, P., Chon, J. W. M. & Gu, M. Five-dimensional optical recording mediated by surface plasmons in gold nanorods. Nature459, 410–413 (2009). [DOI] [PubMed] [Google Scholar]
  • 72.Wiecha, P. R., Lecestre, A., Mallet, N. & Larrieu, G. Pushing the limits of optical information storage using deep learning. Nat. Nanotechnol.14, 237–244 (2019). [DOI] [PubMed] [Google Scholar]
  • 73.Simard, R. & L’Ecuyer, P. Computing the two-sided Kolmogorov-Smirnov distribution. J. Stat. Softw.39, 1–18 (2011). [Google Scholar]
  • 74.Liu, Y. et al. VPTQ: extreme low-bit vector post-training quantization for large language models. In Proc. 2024 Conference on Empirical Methods in Natural Language Processing 8181–8196 (ACL, 2024).
  • 75.Cover, T. M. & Thomas, J. A. Elements of Information Theory 2nd edn (Wiley-Interscience, 2006).
  • 76.Li, N. et al. Large-area metasurface on CMOS-compatible fabrication platform: driving flat optics from lab to fab. Nanophotonics9, 3071–3087 (2020). [Google Scholar]
  • 77.Huang, Z. & Cao, L. Quantitative phase imaging based on holography: trends and new perspectives. Light Sci. Appl.13, 145 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 78.Bouchal, P. et al. High-resolution quantitative phase imaging of plasmonic metasurfaces with sensitivity down to a single nanoantenna. Nano Lett.19.2, 1242–1250 (2019). [DOI] [PubMed] [Google Scholar]
  • 79.Červinka, O. et al. Establishing a library of metasurface building blocks through coherence-controlled holographic microscopy. J. Appl. Phys.139, 053103 (2026). [Google Scholar]
  • 80.Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. In 3rd International Conference on Learning Representations (ICLR) (2015).
  • 81.Rodionov, S. et al. MOCLIP: A Foundation Model for Large-Scale Nanophotonic Inverse Design. Figshare 10.6084/m9.figshare.30772553 (2026). [DOI] [PubMed]
  • 82.Rodionov, S. et al. MOCLIP: A Foundation Model for Large-Scale Nanophotonic Inverse Design. Zenodo 10.5281/zenodo.21160434 (2026). [DOI] [PubMed]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

A subset of the dataset comprising 10,000 samples is openly available in the GitHub repository at https://github.com/RodionovSA/MOCLIP_release and archived on Figshare81. The full dataset is available from the corresponding author upon request.

The full source code used in this study is openly available in a GitHub repository at https://github.com/RodionovSA/MOCLIP_release and archived on Zenodo82.


Articles from Nature Communications are provided here courtesy of Nature Publishing Group

RESOURCES