dataesr/scientific-paragraphs-categorization huggingface dataset:
A central role is given to a proper digital infrastructure and the technical requirements necessary for storing, representing, and analyzing the expected deluge of data necessary for cracking the neural code  22. Digital datasets in nearly all subfields of neuroscience require the right computers to be deeply integrated in daily practice. Moreover, a detailed characterization of cellular anatomy is essential for elucidating neuronal computation. Digital reconstructions increase the reliability of anatomical quantifications and enable biologically realistic computational simulations for investigating the neuronal structure-activity relationship  23. Many improvements have been achieved in neural classification based on morphology, molecules, electrophysiology, transcriptomes, genomes, and biophysics, as well as for better understanding biological structures and functions both systematically and reproducibly  24.
Given the complexity and high dimensionality of neuronal data, our methodology could outperform classical methods in more accurately classifying neuron types. We anticipate these algorithms to expedite processing and enhance accuracy on complex data, such as multi-criteria neuron type classification (morphology, electrophysiology, molecules, transcriptome, genome, biophysics), facilitating more systematic and reproducible understanding of biological structures and functions. In our study, we demonstrated the application of quantum kernel methods in classifying neuronal morphologies using quantum algorithms. We trained both classical and quantum kernel methods with varying kernels and empirically explored different combinations of feature rescaling, feature extraction, feature selection, algorithms, and counts of features and qubits to assess potential advantages of quantum kernels on our datasets.
could prove applicable and advantageous within our framework. The incorporation of these methods and their application to broader datasets could enhance the efficacy of our approach in extracting essential features from the data, resulting in more accurate and efficient neuron type classification. In this demonstration, we trained classical and quantum kernel methods with different kernels. We empirically studied different combinations of feature rescaling, feature extraction, feature selection, algorithms, and numbers of features and qubits to assess where quantum kernels could provide advantages on our datasets. Our results revealed that quantum kernel methods achieve high classification performance, similar to classical ML methods, with some advantages in several cases. To achieve these results, a few critical parameters must be considered regarding data manipulation, one of which is feature engineering.
Finally, the size of the dataset is another parameter to consider. As in the classical world, we observed that the classification accuracy significantly varied according to the sample size. The dataset we used was a compromise between achieving sufficient statistical power and the current limitations of quantum computing resources. As quantum technology advances, we anticipate being able to process larger datasets. Additionally, neuroscience itself lacks digitized neurons. The number of available neuronal morphologies for classification is currently limited  [33] [34] [35] [36]. This is a challenge for the neuroscience community. This limitation indeed calls for innovative techniques to increase the variety and volume of neuronal morphologies at our disposal for more comprehensive studies, which could be addressed by generative artificial intelligence.
However, we believe that our current work offers valuable preliminary insights into the capabilities and potential of quantum machine learning in the context of neuron classification. In parallel, as the field of quantum technology continues to advance, we anticipate an increased capacity to process more extensive datasets. This casts light on the capabilities and prospective benefits of employing quantum machine learning for neuron classification, acting as a stepping stone for future, more expansive research in this burgeoning field. Huang et al. 37  underscore that despite the potential advantages of quantum computing, we must concede that present-day quantum systems are beset with noise and other errors. Full-fledged, fault-tolerant quantum computers remain an aspirational goal. Another paper by  Ezratty 38  astutely notes that even with significant advancements, we have yet to witness the implementation of a use case that resolves actual problems faster or more energy-efficiently than classical supercomputers.
Additionally, error mitigation strategies help us to correct for quantum noise impacting our computation, thus improving the reliability of our results. Moreover, our work also involves benchmarking our quantum machine learning approach against classical algorithms to demonstrate its effectiveness. Quantum ML can be used on real-world datasets and potentially lead to superior classification results compared with classical methods. Our primary objective was to explore the potential of quantum kernel algorithms in this particular domain of neuron morphology classification, investigate their feasibility and their impact on classification accuracy. By harnessing the capabilities of quantum systems, we seek to advance the field of neuroscience by introducing a novel approach that may offer distinct advantages over classical methods.
Methods Datasets. Morphology-based, whole rat brain neuron type classification is challenging, given the significant number of neuron types, limited reconstructed neuron samples, and diverse data formats. For our work on neuron morphology classification, we accessed NeuroMorpho. org, the largest collection of publicly accessible 3D neuronal reconstructions and one of the integrated resources in the Neuroscience Information Framework. It offers the opportunity to use morphological data in the context of other relevant resources and diverse subdomains of neuroscience  28. The morphologies of neurons are usually described, stored, and shared digitally in two types of neuronal formats: SWC-format files (with data compressed but unstructured) and the 2D-or 3D-image format (structured but with high information dimensions)  24.
Digitally reconstructed neurons can be used and re-used in various research projects with different scientific aims  30. One challenge during classification relate to the diverse data formats, such as 2D and 3D images (structured, with high dimensions and fewer samples than the complexity of morphologies) or SWC-format files (low dimensional and unstructured)  33. We accessed digitally reconstructed neurons by species, brain regions, and cell types on NeuroMorpho. org  30. The database contains 173,821 cells derived from/distributed over more than 300 regions. Tools already exist that allow researchers to extract quantitative morphological characteristics from neuronal reconstructions, such as L-Measure  40  and NeuroM (https:// neurom. readt hedocs. io/ en/ stable/ index. html). The reconstructions are usually obtained from fluorescence microscopy preparations or brightfield, which can be synthesized through computation simulations.
We extracted features from 27,881 labeled rat neurons. The data contained three main classes (principal, interneuron, and glial cells) with 14 subclasses, including six types of principal cells (ganglion, granule, medium spiny, parachromaffin, Purkinje, and pyramidal cells), six types of interneurons (basket, chandelier, Martinotti, double bouquet, bitufted, and nitrergic) and two types of glial cells (microglia and astrocytes; Fig. 1 ). Then, from the dataset, we extracted five samples (Fig. 1 ) for multiclass (ganglion, granule, medium spiny, parachromaffin, purkinje, pyramidal, basket, bitufted, chandelier, double bouquet, Martinotti, nitrergic, astrocytes, and microglia) classification. A total of 43 morphological features were extracted for each reconstructed neuron using the L-Measure tool  40  (Fig.
1 ). We then applied our algorithms on the five samples with a Mahalanobis transformation and the suppression of a neuron when the surface of the soma equaled 0 (Fig. 1 ). The Mahalanobis distance is the multivariate metric that measures the distance between a point and a distribution. Applying the Mahalonobis distance allowed us to reduce the standard deviation for each feature by deleting neurons from our dataset. The datasets were preprocessed to deal with missing values. If a value within the features was missing, the neuron was deleted from the dataset. Categorical features such as morphology types were encoded, transforming each categorical feature with m possible values. Data preprocessing. To assess the impact of feature engineering techniques on classical and quantum algorithms, we ran combinations of feature rescaling, feature extraction, and feature selection.
Let X be a random variable following a normal distribution: Then, the quantile function of X is where erf -1 (x) is the inverse error function. Let X be a random variable following a continuous uniform distribution: Then, the quantile function of X is X ∼ N (µ, σ 2 ) Q X p = √ 2σ. erf -1 2p -1 + µ X ∼ U(a, b) After rescaling the data with each of the aforementioned methods, we combined the outputs with feature extraction techniques, which led to more than 150 possible combinations per algorithm. For feature extraction, we reduced the dataset to two features (i. e. , two principal components). The following feature extraction techniques were tested: PCA, ICA, ICA with PCA, LDA, random projection, truncated SVD, Isomap, neighborhood component analysis, t-distributed stochastic neighbor embedding (t-SNE), locally linear embedding (standard LLE), Hessian locally linear embedding (Hessian LLE), MLLE, LTSA, and multidimensional scaling.
Another way to reduce the dimensionality of the dataset is to experiment with feature selection techniques that assign a score to input features based on how useful they are for predicting a target variable. This also allows an enhanced understanding of which features are crucial for classifying neurons. In this study, we combined all of the feature scaling techniques with the following three tree-based feature selection embedded methods: random forest, decision tree, and XGboost. Such tree-based algorithms are commonly used for prediction. They can also be an alternative method for selecting features by revealing which features are more important, and which are the most used, in making predictions on the target variable (classification). Take random forest for example: It is an ML technique used to solve regression and classification and consists of many decision trees; each tree of the random forest can calculate the importance of a feature.
5 when the elements are equally distributed into some classes. The Gini index is calculated as follows: where p i is the probability of an element being classified to a distinct class. Kernel methods. Classifying data using quantum algorithms could provide advantages, such as faster kernel computing compared with classical computing as well as improved classification accuracy. To achieve such advantages, finding and explicitly specifying a suitable feature map is essential; however, this is not straightforward compared with classic kernel specification. Although theoretical work has demonstrated advantages on synthetically generated datasets, concrete, specific applications are required to empirically study whether quantum advantage can be achieved and for what types of datasets and applications.
The challenge lies in finding quantum kernels that could provide advantages on now real-world datasets. In recent years, SVMs have been widely used as binary classifiers and applied to solve multiclass problems. In binary SVMs, the objective is to create a hyperplane that linearly divides n-dimensional data points into two components by searching for an optimal margin, which correctly segregates the data into different classes. The hyperplane that divides the input dataset into two groups can either be in the original feature space or in a higher dimensional kernel space. The selected optimal hyperplane among many hyperplanes that might classify the data corresponds to the one that has the largest margin and that allows the largest separation between classes. This is an optimization problem under constraints, where the distance between the nearest data point and the optimal hyperplane (on each side) is maximized.
, n. For k = 1 and P 0 , we can refer to ZFeatureMap and ZZFeatureMap for k = 2 and P 0 = Z and P 0,1 = ZZ  4. Eight algorithms were used in the present study. The first one we named q_kernel_zz, which applies a ZZFea-tureMap. As described by Havlíček et al. ,  4  we defined a feature map on n-qubits generated by the unitary: where H denotes the conventional Hadamard gate, and U φ( x) is a diagonal gate in the Pauli-Z basis. Taking an example with two qubits, the general expression is as follows: where The encoding function that transforms the input data into a higher dimensional feature space was given by To create a feature map and test different encoding functions, we used the encoding function from Havlíček et al. 4  as follows: For q_kernel_zz, we used the ZZFeatureMap with full entanglement, a different feature dimension depending on the dimensionality reduction techniques (we used two qubits when using feature extraction techniques and five with feature selection techniques); moreover, we repeated the data encoding step two times.
It is also possible to train a quantum kernel with QKA,  16  which iteratively adapts a parametrized quantum kernel to a dataset, converging to the maximum SVM margin at the same time. We named this q_kernel_training. The algorithm introduced by Glick et al. 16  allows a quantum kernel to be learned from a family of kernels (covariant quantum kernels that are related to covariant quantum measurements) and simultaneously converge to the maximum SVM margin, optimizing the parameters in a quantum circuit. To implement it, we prepared the dataset as mentioned previously and defined the quantum feature map. Then, we used the QuantumKernel-Trained. fit method to train the kernel parameters and pass them to an ML model. In covariant quantum kernels, the feature map is defined by a unitary representation D(x) for x ∈ χ and a state |ψ� = U|0 n �.
Software. The algorithms were implanted in Python 3 (http:// www. python. org) using the scikit-learn (https:// scikit-learn. org/ stable/) open-source python library. Morphological features were extracted for each neuron using the L-Measure tool,  40   Classification assessment and selection. For each experiment, to assess whether patterns were identifiable, we trained the supervised classification algorithms using 80% of the data sample described in Fig. 1 , which was randomly chosen, and we assessed the accuracy of predicting the remaining 20%. This method provided an indication of how well algorithms perform on data used for training; however, overfitting and underfitting may have occurred, thereby limiting our understanding of how well the learner would generalize to independent and unseen data.
To optimally fit the model, we also applied the k-fold cross-validation test to better estimate accuracy. We computed the scores five consecutive times. The mean score and the 95% confidence interval are presented. Supervised algorithms were tested on neurons gathered by m-types in young and adult rat populations. We selected the top five algorithms where we applied feature extraction techniques and where data were dimensionally reduced to two features. The algorithms were chosen according to the classification accuracy scores based on k-fold cross-validation for both classical and quantum simulation algorithms (two qubits) applied to sample 5 (Fig. 1 ). To understand the behavior of the chosen algorithms, we then compared the results with the accuracy of the selected algorithms applied to other samples (Samples 1, 2, 3, and 4).
In addition, we demonstrated two types of glial cells: (m) a microglia cell (farsight624) from the frontal neocortex and (n) astrocyte cells (A1-CA1-L-C63x1zACR1) from the hippocampus. (o) Feature's importance using XGBoost, decision tree, and random forest applied to the entire dataset (sample 5). (p) Definition of the 43 morphological features extracted for each neuron. They were extracted using the L-Measure tool, 40  providing quantitative morphological measurement from neuronal reconstruction (http:// cng. gmu. edu: 8080/ Lm/ help/ index. htm). (q) Dataset with the number of neuron morphologies for multiclass classification. From the 27,881 extracted neurons, 22,691 neurons (sample 5) remained after the application of Mahalanobis distance transformation and the suppression of all neurons with a soma surface equal to 0.
Machine Learning for Source Code (ML4Code) is an active research field in which extensive experimentation is needed to discover how to best use source code's richly structured information. With this in mind, we introduce JEMMA: An Extensible Java Dataset for ML4Code Applications, which is a large-scale, diverse, and high-quality dataset targeted at ML4Code. Our goal with JEMMA is to lower the barrier to entry in ML4Code by providing the building blocks to experiment with source code models and tasks. JEMMA comes with a considerable amount of pre-processed information such as metadata, representations (e. g. , code tokens, ASTs, graphs), and several properties (e. g. , metrics, static analysis results) for 50,000 Java projects from the 50K-C dataset, with over 1. 2 million classes and over 8 million methods.
JEMMA is also extensible allowing users to add new properties and representations to the dataset, and evaluate tasks on them. Thus, JEMMA becomes a workbench that researchers can use to experiment with novel representations and tasks operating on source code. To demonstrate the utility of the dataset, we also report results from two empirical studies on our data, ultimately showing that significant work lies ahead in the design of context-aware source code models that can reason over a broader network of source code entities in a software project-the very task that JEMMA is designed to help with.
In the present day, large-scale machine learning models of source code, based on the Transformer architecture, e. g. CuBERT (Kanade et al. 2020) , PLBART  (Ahmad et al. 2021) , CodeBERT  (Feng et al. 2020) , and GraphCodeBERT  (Guo et al. 2020 ) have achieved state-of-the-art performance on a number of Software Engineering (SE) tasks such as code generation, code search, code summarization, clone detection, code translation, and code refinement. Largely by increasing the capacity of models and training datasets, deep learning based code completion has transitioned from the token level  (Karampatsis et al. 2020 ) to completing entire snippets of code  (Chen et al. 2021) , the latter being now available on IDEs as an extension named GitHub Copilot 1. In parallel, other works on modeling of source code have observed that source code has a well-known structure compared to natural language.
2017). The space of possibilities to model source code is vast, from text to tokens to advanced graphs-although each comes with its own issues and challenges. Thus, while being mindful of how we represent source code with as much information as possible, we also need to make sure that the models trained on such representations are scalable and reliable for a number of source code tasks and corresponding applications. and gather additional information, and then building an experimental infrastructure in place, requires a large amount of time and effort-even before a single experiment is run. This is all the more true when this has to be done for source code models, where some of the preprocessing and analysis tools can be extremely time-consuming and resource-intensive at scale. Therefore, in this paper, we contribute such a dataset: JEMMA.
JEMMA as a Dataset JEMMA has multiple levels of granularity: from methods, to classes, to packages, and entire projects. It consists of over 8 million Java method snippets along with substantial metadata; pre-processed source code representations-including graph representations that comes with control-and data-flow information; call-graph information for all methods at the project-level; and a variety of additional properties and metrics. We make sure that all the processed data are clean, consistent, as well as comprehensive-using common data validation, filtering, deduplication, and data curation techniques. Corrupted, incomplete, and blank/null values were corrected where possible; valid results were accurately and consistently mapped to source code entities based on data curation principles; some outputs were filtered at source based on an expected range, on expected datatypes, and/or on formatting conventions; while deduplication eliminated redundant or corrupted entries.
Furthermore, the availability of supplementary data down to AST-node level, resulting from our extensive processing, ensured comprehensiveness at scale, for millions of source code entities defined within JEMMA. All of which contribute to the overall quality of the data presented. JEMMA is built upon the 50K-C dataset of compilable Java projects  (Martins et al. 2018) , and complements it with significant processing, measured in years of compute time. Section 3 presents all the components of the JEMMA Dataset. JEMMA as a Workbench JEMMA is not a static dataset: we purposefully designed it to be extensible in a variety of ways. Concretely, JEMMA comes with a set of tools to: add metrics or labels to source code snippets (e. g. , by utilizing static analysis tools); define prediction tasks based on metrics, properties, or the representation themselves; process the code snippets and existing representations to generate new representations of source code; and run supported models on a task.
We describe how to extend the dataset, along with several examples in Section 4. This extensibility is critical, because it transforms JEMMA into a workbench with which users can experiment with the design of ML models of code and tasks, while saving a lot of time in pre-processing the data. Traditionally, a database workbench is described as a tool that can be used to view, create, and edit tables, indexes, stored procedures, and other database metadata objects. Thereby, if we now extend the same concept to working with our collection of data, the JEMMA Workbench is a set of tools and helper functions that helps in several operations such as viewing, creating, retrieving from, and appending to datasets (independent of how they are stored), among many other tasks that do not involve working directly with the datasets.
Empirical Studies with JEMMA In Sections 5 and 6, we show how JEMMA can be used to gain insights via empirical studies. The first is a study on the non-localness of software, and how it impacts the performance of models on a variant of the code completion task. This study shows how the data from JEMMA can be used to gain insights into how the models perform on code samples, highlighting what performance issues exist and what we can do to address such issues by adding project-wide context (Section 5). The second is the study of the size of entities that constitute software projects, and how it relates to the context size of popular machine-learning (ML) models. The second study confirms that significant work lies ahead in designing models that efficiently encode large contexts (Section 6). While these examples are related to empirical analyses in the sub-field of Machine Learning for Software Engineering, we can envision further uses for JEMMA in empirical studies.