Pancreatic ductal adenocarcinoma (PDAC) is a highly mortal cancer with surgical resection the only potentially curative treatment. The accurate intraoperative assessment of PDAC surgical margins is significant in guaranteeing resection adequacy and improving the patient’s survival. However, the commonly used frozen-section pancreatic biopsy is limited by its strict requirement of practitioners and lack of objectivity. Here, we developed the multi-instance cytology with learned Raman embedding (MICLEAR), a label-free cytology based on chemical information reflected by Raman spectra. First, 4085 cells collected from 41 patients were imaged with stimulated Raman scattering (SRS) microscopy. Then, a contrastive learning (CL)-based cell embedding model was obtained to represent each cell with a concise vector that contained its morphological and componential information. Finally, a multi-instance learning (MIL)-based diagnosis model using cell vectors predicted the probability that the margin was positive. MICLEAR reached 80% sensitivity, 94.1% specificity, and 0.86 AUC on the pancreatic neck margin (PNM) samples from 27 patients. It holds promise for rapid and accurate assessment of PDAC surgical margins.