dataesr/scientific-paragraphs-categorization huggingface dataset:
Participants tested in a room with dividers separating participants from each other. We used the provided PsychoPy scripts in English. In all other respects, we followed the official protocol. Although our pre-registered plan specified that we would test at least 30 men and 30 women in each condition, we ended with a larger proportion of men compared to women. This meant that we only collected n=28 usable female participants in the Professor condition. While this number was below our pre-registered target, data collection ended above the participant minimums (n=25) for all conditions. enough male participants. After consulting the editor and prior to data analysis, we ended data collection with usable data from 12 men in the professor condition and 8 men in the Hooligan condition.
In the case of contracting absorbers, the difference spectra yielded distinct bipolar shapes with a low-frequency minimum and a high-frequency peak (Supplementary Figure  S4a ), whereas the shapes corresponding to expanding absorbers are inverted (Supplementary Figure  S4b ). Hence, melanosome aggregation is expected to be reflected by a distinct bipolar difference spectrum of photoacoustic frequencies. In the next step, we performed a frequency analysis of the photoacoustic data recorded by RSOM from the zebrafish during background adaptation. To this end, we summed up the frequency spectra of all potentially melanin-related signals across the entire photoacoustic dataset to obtain the cumulative power spectra (CPS) for both lightadapted or dark-adapted conditions. The CPS of the fish measured in darkness exhibited a maximum at ~38 MHz (grey curve in Figure  1f ).
After amplification with a low-noise amplifier (AU-1291, Miteq Inc, USA; gain: 63 dB), the detected photoacoustic signals were recorded by a high-speed digitizer at a sampling rate of 1GS/s (EON-121-G20, Gage-applied, Montreal, Canada; vertical resolution: 12 bit). For the light adaptation experiment, the signals were acquired with a similar device at 0. 9 GS/s (ADQ-412-3G, SP Devices, Linköping, Sweden; vertical resolution: 12 bit). The trigger for the data acquisition was provided by a photodiode (DET36A, Thorlabs, Newton, NJ, USA) that collected scattered laser light. Raster-scanning was performed by laterally moving the transducer together with the illumination over the sample in a semi-continuous manner by means of two motorized high-precision piezo stages (M-683. 2U4, Physik Instrumente GmbH & Co.
Analysis of the pigmented area with brightfield microscopy and RSOM The pigmented areas of imaged cells were analyzed using the ROI manager tool from the 'Fiji' software  43   Detailed methods on MORSOM imaging and the frequency analysis can be found in the Supplementary Information. We are grateful for financial support from the European Research Council under grant agreements ERC-St: 311552 (A. L. , G. G. W. ), the DFG Reinhart Koselleck project "High resolution near-field thermoacoustic sensing and imaging" NT 3/9-1 (D. S. , M. O. , V. N. ) and the Federal Ministry of Education and Research, Photonic Science Germany, Tech2See-13N12624 (D. S. , M. O. , V. N. ).
A labeled dataset comprised of more than 300,000 spectral signatures is used as the training dataset for the supervised stage of the classification algorithm. In this preliminary study, thematic maps obtained from a validation database of seven hyperspectral images of in vivo brain tissue captured and processed during neurosurgical operations demonstrate that the system is able to discriminate between normal and tumor tissue in the brain. The results can be provided during the surgical procedure (~1 min), making it a practical system for neurosurgeons to use in the near future to improve excision and potentially improve patient outcomes.
This demonstrator is designed to help surgeons with brain tumor resection, avoiding the excessive extraction of normal tissue and preventing small remnants of tumors from being left behind. Such precise delimitation of the tumors boundaries will improve the results of the surgery and is expected to improve patient outcomes. Although some parts of the system have been already described in previous works  [41] [42] [43] [44] [45] , in this paper we present, for the first time, a comprehensive description of the full system, including parts not previously addressed like the integration with hardware acceleration. We also present the measurements of the total times (for acquisition and processing), and the results using the complete training database and data from five new patients (which were not employed to train the classifier) to validate the overall system.
Control Unit The control unit (CU) is responsible for managing all the subsystems that comprise the demonstrator. This CU is a computer based on an Intel ® Core™ i7-4770k 3. 5 GHz quad-core processor, with 8 GB of Random Access Memory (RAM) and a high-capacity 512 GB solid-state drive with write speeds exceeding 500 MB/s. Specific software was developed to manage and integrate the different elements that conform the acquisition platform, allowing the user to perform the HS image acquisition in an easy and effective way. Furthermore, the CU is in charge of executing the HS brain cancer detection algorithm together with the hardware accelerator in order to finally present the tumor boundary prediction.
HS Image Acquisition Software Customized software for image acquisition was developed due to the need to automate and accelerate the capture of both HS cameras of the system. The simplification of the acquisition procedure ensures easy interaction of the user with the system as well as reduced time needed to capture the HS images during neurosurgical procedures. To develop this software, three different software development kits (SDKs) were integrated, belonging to the two HS cameras and the stepper motor controller. Figure  4a  shows the HS image acquisition software flow diagram for the capturing procedure. Firstly, after running the program, the scanning platform is initialized, detecting and establishing the absolute zero of the motor position. Then, the platform is positioned at the center of the scanning area.
After that, the stepper motor moves the scanning platform to the central position. Then, the synthetic RGB images of both HS cubes are generated by selecting three bands that correspond with red (708. 97 nm), green (539. 44 nm), and blue (479. 06 nm) colors for the VNIR image, and three bands of the NIR cube to generate a false color RGB image (red: 1094. 89 nm, green: 1247. 44 nm and blue: 1595. 45 nm). These bands are selected to maintain the compatibility with the original software (Hyperspec ® III software, Headwall Photonics Inc. , Fitchburg, MA, USA) provided by the camera manufacturer. Using this technique for the acquisition process, a speedup of 3× with respect to the original software is achieved. The maximum image size provided by the system is 1004 × 1787 pixels (129 × 230 mm) for the VNIR image, and 320 × 479 pixels (153 × 230 mm) for the NIR image, with spatial resolutions of 128.
7 µm and 480 µm, respectively. Figure  4b  shows the acquisition system being used during a neurosurgical operation and the RGB synthetic images of the captured HS cubes (VNIR and NIR) where their image sizes and relative spatial resolutions can be seen. The time employed by the system to obtain the maximum size image using the manufacturer's software is ~240 s for the VNIR image and ~140 s for the NIR image. However, employing the acquisition software developed in this work, the acquisition time for the maximum image size is reduced to ~80 s and ~40 s for the VNIR and NIR cameras, respectively. blue: 1595. 45 nm). These bands are selected to maintain the compatibility with the original software (Hyperspec ® III software, Headwall Photonics Inc. , Fitchburg, MA, USA) provided by the camera manufacturer.
The MPPA ® EMB01 board contains a standard host ×86 ComExpress module working as an embedded computer, and a carrier board containing the MPPA-256 many-core chip. Figure  5a  shows the MPPA ® board (in the center of the image) connected to a preliminary environment developed to execute the hardware accelerated part of the algorithm. The host module side of the board (Figure  5b ) is composed of an AMD G-T40E Dual Core Processor with an integrated graphics processor unit (GPU) running a CentOS 7 GNU/Linux operative system (OS) instance with 4 GB of RAM, 1 Peripheral Component Interconnect Express (PCIe) Gen2×2 for communication with the MPPA ® -256 many-core chip, and a 16-GB solid-state drive (SSD) as a system disk. The carrier board can be seen in Figure  5c. It features an MPPA ® -256 many-core processor (under the fan).
It also contains 4 GB of RAM and 64 MB of flash memory plus the host PCIe Gen2×2 port to communicate with the dual core processor. processor unit (GPU) running a CentOS 7 GNU/Linux operative system (OS) instance with 4 GB of RAM, 1 Peripheral Component Interconnect Express (PCIe) Gen2×2 for communication with the MPPA ® -256 many-core chip, and a 16-GB solid-state drive (SSD) as a system disk. The carrier board can be seen in Figure  5c. It features an MPPA ® -256 many-core processor (under the fan). It also contains 4 GB of RAM and 64 MB of flash memory plus the host PCIe Gen2×2 port to communicate with the dual core processor. The Kalray MPPA-256 is a single-chip many-core processor that assembles 256 user cores distributed in 16 clusters running at 400 MHz. This chip comprises 256 user cores-32-bit very long instruction word (VLIW) processors with floating point units-distributed in several computing clusters.
Additionally, this platform contains quad-core input/output (I/O) subsystems to manage the communications with the clusters. A network-on-a-chip (NoC) manages the synchronization and communications among the compute clusters and the I/O subsystem. Each cluster gathers 2 MB of memory-which is shared among the 16 cores-as well as a resource management (RM) core aimed at running the cluster operating system (NodeOS) and managing events and interrupts, and a direct memory access (DMA) module to transfer data from the shared memory to the NoC and vice versa. This architecture presents two main advantages: first, the system parallelization complexity is maintained within reasonable limits as the MPPA ® includes mechanisms such as POSIX (Portable Operating System Interface), OpenMP, and OpenCL; and secondly, in comparison with other The Kalray MPPA-256 is a single-chip many-core processor that assembles 256 user cores distributed in 16 clusters running at 400 MHz.
This chip comprises 256 user cores-32-bit very long instruction word (VLIW) processors with floating point units-distributed in several computing clusters. Additionally, this platform contains quad-core input/output (I/O) subsystems to manage the communications with the clusters. A network-on-a-chip (NoC) manages the synchronization and communications among the compute clusters and the I/O subsystem. Each cluster gathers 2 MB of memory-which is shared among the 16 cores-as well as a resource management (RM) core aimed at running the cluster operating system (NodeOS) and managing events and interrupts, and a direct memory access (DMA) module to transfer data from the shared memory to the NoC and vice versa. This architecture presents two main advantages: first, the system parallelization complexity is maintained within reasonable limits as the MPPA ® includes mechanisms such as POSIX (Portable Operating System Interface), OpenMP, and OpenCL; and secondly, in comparison with other architectures like GPUs or field programmable gate arrays (FPGAs), the MPPA ® platform leads in terms of energy efficiency  [51].
HS Training Database Employing the HELICoiD demonstrator, a total of 36 HS cubes of in vivo brain tissue belonging to 22 different patients were acquired from two different hospitals (the University Hospital Doctor Negrin at Las Palmas de Gran Canaria, Spain, and the University Hospital of Southampton, Hampshire, UK) in two data acquisition campaigns. The study protocol and consent procedures were approved by the Comité Ético de Investigación Clínica-Comité de Ética en la Investigación (CEIC/CEI) for the University Hospital Doctor Negrin, and the National Research Ethics Service (NRES) Committee South Central-Oxford C for the University Hospital of Southampton. Written informed consent was obtained from all subjects. The creation of the training dataset (the gold standard employed to train the HS brain cancer detection classifier) was performed in the following way.
After marker placement, the operator of the system captured an HS image. Depending on the location of the tumor, the images were acquired immediately after the dura removal (Figure  6a ) when the tumor was superficially located, or in an advanced stage of the tumor resection (Figure  6c ) when the tumor was deep-seated. Glioblastoma (GBM) heterogeneity is one of the main problems in establishing a gold standard for a training and validation dataset. For this reason, when possible, several images were captured at different stages of the operation of both of the necrotic core and the enhanced rim of the tumor tissue. Once the HS image was obtained, the operating surgeon performed a biopsy of the tissue located within the tumor tissue marker or within the clearly identified tumor area. The resected tissue was sent to the pathologist to confirm the presence or absence of tumor, and to specify its histopathological diagnosis (grade and type of tumor).
The average size of the resected tumor sample obtained for pathological analysis was 0. 5 × 0. 5 mm, with a 0. 2-mm depth, since HSI technique cannot practically penetrate into the tissue (in the case of NIR, the depth was of 1 mm at most). Normal tissue markers were only used as a reference for the labeling process carried out after the completion of the operation. It is not ethical to biopsy what is known to be normal brain tissue, as this can result in damage to the patient. In this preliminary study, the spectral differences between grey matter and white matter in normal brain sample were not taken into account. These differences were not relevant in this study as the intention was to only resect tumor tissue. The labeling of the HS cubes was performed using histopathological information (from the tumor tissue samples) and the knowledge of the operating surgeon (from the normal tissue samples) to create a training dataset for the supervised classifier of the HS brain cancer detection algorithm.
In order to increase the training dataset, a methodology for extracting the gold standard information from the HS cubes, based on the spectral angle mapper (SAM) algorithm  [52] , was developed and designed using Matlab ® GUIDE application. This SAM algorithm is an automated method for comparing the spectra of the pixels of a HS image with a well-known spectrum obtained from a reference pixel. The tool was employed by the corresponding operating surgeon after the completion of the operation to create the gold standard map for each captured HS image. Four different classes were established in this study: normal tissue, tumor tissue, blood vessel/hypervascularized tissue, and background (i. e. , other materials or substances that can be presented in the surgical scenario but are not relevant for the tumor resection procedure).
Once the user considers that only the pixels belonging to one class have been highlighted, the selected pixels are assigned to that class. Neurosurgeons are instructed to select only a few sets of very reliable pixels instead of a wider set of uncertain pixels. Figure  6b, d  shows an example of a gold standard map, where the labeled pixels that belong to tumor tissue, normal tissue, blood vessels/hypervascularized tissue, and background are identified with red, green, blue, and black colors, respectively. In the end, the reliability of the training dataset is guaranteed by the use of (a) intraoperative MRI neuronavigation for locating tumor tissue; (b) the operating surgeon's knowledge and experience in the labeling of normal tissues, blood vessels/hypervascularized tissues, and background samples; and (c) the pathological analysis of the resected tissues for the tumor labeling.
After a preliminary analysis of the spectral signatures of both HS cubes (VNIR and NIR), only the VNIR images were labeled and used to generate the training dataset for the brain cancer detection algorithm. This was because of the practical impossibility of performing reliable labeling of the NIR images due to the low spatial resolution of these HS cubes (Figure  4b ). Figure  6e, f  show the mean and standard deviations of the VNIR spectral signatures of normal brain tissue (green color), blood vessels/hypervascularized tissue (blue color), and tumor tissue (red color) affected by GBM. In Figure  6e , the intra-patient variability (of one patient affected by GBM) of the spectral signatures can be seen, while in Figure  6f , the inter-patient variability (of 13 patients affected by GBM) is shown.
In these cases, the tumor samples were obtained from the center of the tumor in the brain surface identified using the intraoperative neuronavigation system. These spectral signatures were extracted from the VNIR HS cube after the application of the pre-processing chain of the HS brain cancer detection algorithm (described in the next section). Figure  6g  shows the average spectral signatures of each tumor type comprising the training database. As can be seen in this figure, there are significant spectral differences between these types of tumors. However, this study has mainly addressed the discrimination between tumor tissue (involving all the types of tumors) and normal tissue. In order to determine the suitable percentage of samples of the training database that should be used to train the supervised algorithm, several experiments to generate and evaluate the supervised model were carried out employing different number of training samples.
Each experiment was performed following a 10-fold cross-validation method to calculate the average overall accuracy result. Figure  7  shows the overall accuracy results varying the percentage of training samples with increments of 2%, starting at 2% and finishing at 100%. The evolution of the overall accuracy shows Table  1  details the total number of pixels labeled per each class and type of tissue. The tumor class involves two different primary tumors (GBM and grade III anaplastic oligodendroglioma) and three different secondary tumors, also called metastatic tumors (lung, renal, and breast carcinomas). After labeling all the available data, a total of 377,556 spectral signatures were obtained from the training database. Using this training dataset, the supervised classification stage of the HS brain cancer detection algorithm was trained in order to generate the classification maps from a new patient during the surgical procedure.
Although different types of tumors were included in the training database, for this preliminary study only one multiclass supervised classifier was generated to differentiate primarily between tumor and normal tissue. Only one classifier was used instead of a different one per each type of tissue due to the reduced number of samples obtained for each type of tumor. In order to determine the suitable percentage of samples of the training database that should be used to train the supervised algorithm, several experiments to generate and evaluate the supervised model were carried out employing different number of training samples. Each experiment was performed following a 10-fold cross-validation method to calculate the average overall accuracy result. Figure  7  shows the overall accuracy results varying the percentage of training samples with increments of 2%, starting at 2% and finishing at 100%.
Secondly, a pre-processing chain is applied to homogenize the spectral signatures of the HS cube. Thirdly, a supervised pixel-wise classification is performed in order to obtain a classification map, where different types of tissues are identified according to the information previously provided by medical doctors. The supervised classifier employed is the support vector machine (SVM) algorithm  [53] , previously trained in the off-line process with the HS training dataset. Fourthly, once the supervised classification map is obtained, a spatial-spectral homogenization is accomplished using k-nearest neighbors (k-NN) filtering, where a one-band representation of the hypercube is employed. The dimensionality reduction algorithm used to obtain the one-band representation of the hypercube is the principal component analysis (PCA) algorithm  [45].
Experimental Results and Discussion The validation of the HELICoiD demonstrator was performed during neurosurgical operations at the University Hospital Doctor Negrin of Las Palmas de Gran Canaria, employing the data of four different patients affected by different types of tumors. Table  2  details the characteristics of the validation database used to test the developed HS brain cancer detection system and the corresponding pathological diagnosis. Seven different images were included. These images involved normal brain tissue acquired during the first stage of the surgical operation, used to test if the system included false positives when no tumor as present in the image, and three different types of primary tumors. The TMD maps of the validation database obtained by the HELICoiD demonstrator during the surgical operations and their respective synthetic RGB images are shown in Figures  9  and 10.
In Figure  10b , there are some false positives in the bottom corner of the TMD map, however, this false information is located outside the area of exposed brain parenchyma and thus, it does not affect the neurosurgeon decisions during the tumor resection. It is worth noting that two of the cases (Figure  10b, d ) identify two tumor types (grade II oligodendroglioma and grade I meningioma) for which there are no spectral signatures within the training database. These results highlight the robustness and the generalization capabilities of the HELICoiD demonstrator to identify other types of tumor rather than only the ones available in the HS training database. Finally, it should be mentioned that the tumor identification becomes more difficult when the tumor is located deeper in the brain. Figure  10f ,h show the TMD maps of GBM tumors at an advanced stage of the surgical procedure.
It can be seen that, in case of Figure  10f , the tumor tissue is clearly identified although it is located in a deep layer. However, in Figure  10h , there is no correct identification of the tumor tissue due to problems with shadows and the presence of extravasated blood in the tumor area. Since HSI is not able to penetrate into the surface, extravasated blood present in the image is identified as a hypervascularized tissue class (blue color) in the TMD map. The TMD maps of the validation database obtained by the HELICoiD demonstrator during the surgical operations and their respective synthetic RGB images are shown in Figures  9  and 10. The TMD maps are represented in four colors that can be mixed depending on the density of each class presented in the image. Figure  9  shows the results obtained from the normal brain images.
It is worth noting that two of the cases (Figure  10b, d ) identify two tumor types (grade II oligodendroglioma and grade I meningioma) for which there are no spectral signatures within the training database. These results highlight the robustness and the generalization capabilities of the HELICoiD demonstrator to identify other types of tumor rather than only the ones available in the HS training database. Finally, it should be mentioned that the tumor identification becomes more difficult when the tumor is located deeper in the brain. Figure  10f ,h show the TMD maps of GBM tumors at an advanced stage of the surgical procedure. It can be seen that, in case of Figure  10f , the tumor tissue is clearly identified although it is located in a deep layer. However, in Figure  10h , there is no correct identification of the tumor tissue due to problems with shadows and the presence of extravasated blood in the tumor area.