  Nanophotonic devices excel at confining light into intense hot spots of the
electromagnetic near fields, creating unprecedented opportunities for
light-matter coupling and surface-enhanced sensing. Recently, all-dielectric
metasurfaces with ultrasharp resonances enabled by photonic bound states in the
continuum have unlocked new functionalities for surface-enhanced
biospectroscopy by precisely targeting and reading out molecular absorption
signatures of diverse molecular systems. However, BIC-driven molecular
spectroscopy has so far focused on endpoint measurements in dry conditions,
neglecting the crucial interaction dynamics of biological systems. Here, we
combine the advantages of pixelated all-dielectric metasurfaces with deep
learning-enabled feature extraction and prediction to realize an integrated
optofluidic platform for time-resolved in-situ biospectroscopy. Our approach
harnesses high-Q metasurfaces specifically designed for operation in a lossy
aqueous environment together with advanced spectral sampling techniques to
temporally resolve the dynamic behavior of photoswitchable lipid membranes.
Enabled by a software convolutional neural network, we further demonstrate the
real-time classification of the characteristic cis and trans membrane
conformations with 98% accuracy. Our synergistic sensing platform incorporating
metasurfaces, optofluidics, and deep learning opens exciting possibilities for
studying multi-molecular biological systems, ranging from the behavior of
transmembrane proteins to the dynamic processes associated with cellular
communication.
