dataesr/scientific-paragraphs-categorization huggingface dataset:
EXPERIMENTAL EVALUATION We implemented our DSL, full compilation procedure and final LLVM IR generation in a tool dubbed ribbit, which is publicly available. The tool supports ADT declarations with recursive types and user-defined memory layouts, including our extension to irregular layouts (Section 7. 1), constant patterns and multi-discriminant splits (Appendix B). Our code generation outputs fully shared decision trees (following  Maranget [2008] ). Finally, on top of the numerous examples described in the rest of this article, we implemented "full representations", i. e. , functions from source types to memory types mimicking existing languages, such as OCaml. In this section we demonstrate: • that ribbit is expressive enough to reproduce the behavior of native OCaml and Rust compilers, on some representative middle-sized examples, with similar performance; • that acting on low-level memory layouts impacts static characteristics of generated decision trees, as well as execution-time performance.
The latest version of our artifact, which includes ribbit along with instructions to reproduce these results, is available at https://doi. org/10. 5281/zenodo. 7994178. For this purpose, we consider two examples: the red-black trees motivating example from Section 2, and a stack machine interpreter example used by  Maranget [2008]  to showcase various heuristics for OCaml pattern-matching compilation. The full programs are available in Appendix G. For these two examples, we have implemented native OCaml and Rust versions, two ribbit versions mimicking the internal memory representations of OCaml and Rust, along with the Linuxlike red-black tree encoding from Section 2. 3. Details of internal memory layout were obtained both from non-official sources [Minsky and Madhavapeddy 2021; The Rustonomicon 2023] and by manual inspection of emitted intermediate representations.
However, we do not attempt to match compilation heuristics. Experiments have been performed on a desktop machine running Gentoo GNU/Linux x86-64 on an Intel Core i5 CPU @ 1. 60GHz ×8 (although ribbit is single-threaded), with 32 Gio of RAM. As for compiler versions, we used Rust 1. 67. 1, OCaml 4. 14. 0 and LLVM 14. Fig. 11. Static metrics of decision trees generated by ribbit : code size is the total number of switches; we also compute the number of switches per path in the decision tree; and the number of dereferences along these paths. In Fig. 10  we first compare the memory size and number of pointers for some concrete values (a small stack program and a red-black tree with 30 nodes), to cross-validate our memory layout specifications (the size of objects in OCaml/Rust versus the size obtained in ribbit with our encoding).
As shown, the data match for all implementations. We then compare execution-time performance of the generated code. This comparison should be made while keeping in mind that ribbit emits code that does far less than native OCaml or Rust: our prototype implementation does not implement sophisticated memory management, or even proper function calls. Additionally, the measured times are very tiny, making measurement difficult. Our goal here is only to show that our technique can emit code of similar efficiency to seasoned industry-ready compilers using their memory layouts, which is indeed the case. The final lesson from these dynamic measurements is that improving the representation of values is very worthwhile: each reduction from the OCaml representation to the Rust and then to the Linux layout significantly reduces memory footprint and execution time.
The Linux red-black trees implementation, in particular, is extremely efficient while having a tiny footprint, demonstrating the gain of such sophisticated bit-stealing. Figure  11  depicts static metrics obtained via ribbit for different memory encodings. For both benchmarks, the better performance obtained with the Rust layout and to a further extent with the Linux layout seems to correlate with fewer derefencing operations. Perhaps unsurprisingly, it seems that a good static measurement to predict performance is the amount of indirection. These results suggest that we should complement existing heuristics for pattern matching compilation with new ones taking data layout-related metrics into account, such as number of dereferencing operations and cache friendliness. We plan to explore this in the future.
Memory Representation and Algebraic Data Types Memory representation in functional polymorphic garbage-collected languages was quickly identified as an important area for performance improvement  (Jones and Launchbury [1991] ,  Leroy [1992], and Peterson [1989] ). Our work encourages new development in this area, as it readily supports such layouts and allows to easily experiment with new representations. Unboxing and arrays have been the subject of numerous works and libraries (see  [Keller et al. 2010 ] for a recent Haskell example). We believe many of the data layouts proposed in these works would enhance our approach, notably regarding mutability and concurrency, which we do not explore. Colin et al. [2018]  refine the criterion for recursive yet unboxed types in the OCaml case. We believe a similar refined criterion could be used in the irregular case.
Iannetta et al. [2021]  and  Koparkar et al. [2021]  propose completely flattened representations for recursive types, providing excellent cache behavior and parallelism but requiring whole-program transformations. In contrast, our technique provides great manual control over memory representation and follows a more traditional compilation pipeline. Supporting such fully flattened layouts would be highly desirable. Several approaches attempt to combine polymorphism and optimized data layouts. Leroy [1990]  shows how to make polymorphic and monomorphic representations work conjointly and  Hall et al. [1994]  show how to marry specialization and unboxing. Classically, C++ and Rust rely aggressively on specialization. All these approaches would be compatible with our work. Rust uses the notion of "niche" to exploit unused bits in words and pointers.
Pattern Languages Pattern languages have been adopted in mainstream languages with rich static typing such as Haskell, OCaml, F#, Scala or Rust, but also more recently in more general languages such as Python and soon Java. This diversity of host languages, with their very varied compilation techniques and memory representations, make our work all the more relevant. We focused on the core of pattern matching language, with some minor extensions such as disjunctive patterns. Extensions such as ranges, guards, or polymorphic variants  [Garrigue 1998 ] are orthogonal to our work. Pattern matching is also used pervasively in dependently typed languages  [Cockx et al. 2016; Tuerk et al. 2015 ] and for GADTs  [Garrigue and Normand 2015; Karachalias et al. 2015 ]. In such setting, matching on a term can reveal the type of another term.
CONCLUSION We have presented ribbit 4  , a language approach to describe bit-aware memory representations of ADTs based on a dual-view approach. From source and memory specifications, ribbit compiles constructors and destructors to low-level code. We demonstrate the expressivity and versatility of our approach by encoding classic memory layouts for ADTs (OCaml, Rust) along with numerous memory optimizations such as bit-stealing, unboxing, and inlining. As we provide end-users with an expressive language, we propose a notion of validity and agreement between source and memory types. Together with correctness proofs, these notions strongly increase the trust of the whole process (hence the main title of this article). Our technique paves the way towards the formalization and description of optimization techniques for memory representation.
A EXAMPLE: WEBKIT-LIKE NAN-BOXING In this section, we describe a representation that models the memory layout used in the JavaScript-Core engine (built into WebKit) to encode JavaScript values on 64-bit platforms, which uses an optimization dubbed NaN-boxing. Our description is based off the implementation available in  [We-bKit NaN-boxing 2023]. We use the following extensions to our memory description framework: • irregular specifications with nested provenances, described in Section 7. 1; • "default" branches in splits that capture values which do not match any other branch, which we denote with a wildcard discriminant value _. For instance, Split ( )  : provs 1 ⇒  1 _ : provs 2 ⇒  2 describes a memory type that maps values whose provenance is in provs 1 to  1 , which always contains  at the position , and values whose provenance is in provs 2 to  2 , which never contains  at the position ; • pattern matching on integer and floating-point numeric constants, described in Appendix B.
Facial movements are crucial for human interaction because they provide relevant information on verbal and non-verbal communication and social interactions. From a clinical point of view, the analysis of facial movements is important for diagnosis, follow-up, drug therapy, and surgical treatment. Current methods of assessing facial palsy are either (i) objective but inaccurate, (ii) subjective and, thus, depending on the clinician's level of experience, or (iii) based on static data. To address the aforementioned problems, we implemented a deep learning algorithm to assess facial movements during smiling. Such a model was trained on a dataset that contains healthy smiles only following an anomaly detection strategy. Generally speaking, the degree of anomaly is computed by comparing the model's suggested healthy smile with the person's actual smile.
Furthermore, we implemented the model through a graphical user interface (GUI), available at https://github. com/PolezhaevaOlga/Face_Motion_Capture (accessed on 12 December 2022), to test its practical usage in clinical routines. Generally speaking, the software evaluates the movement of the patient's lower third of the face when smiling and provides relevant information on possible diagnoses. Moreover, the software provides a global degree of anomaly that further complements the clinician's diagnostic. Specifically, the evaluation is carried out with a long short-term memory (LSTM) model  [40]  defined as an anomaly detector; thus, it compares the patient's movement with its own prediction. When evaluating a smile, the model is able to predict a healthy estimation of it because it was trained on a dataset that contained solely smiles from healthy volunteers following a one-class anomaly detection strategy  [41].
The main objective of this study is to present a different approach, through a deep learning model, to objectively assess facial movement. The second objective is to provide the open-source software, containing the trained model, that served as the proof of concept of our approach. Below, Section 2 covers the data acquisition and preprocessing as well as the mathematical definitions of the baseline model and our proposed deep learning model. Then, Section 3 details the training and evaluation of the proposed model, the comparison between the latter model and the baseline, and the GUI built to assist clinicians. Lastly, the model's advantages and limitations are discussed in Section 4, and the paper provides a brief conclusion in Section 5.
Motion Capture Sessions The data used in this paper were acquired in several motion capture sessions. In each session, we recorded a neutral expression and five facial movements: gentle closure of the eyelids, forced closure of the eyelids, pronunciation of the [o] sound, pronunciation of the [pµ] sound and broad smiling. The movements were recorded by tracking 105 reflective markers with an optical-passive motion capture system (Vicon Ltd. , Oxford, UK). Prior to the sessions, a group of volunteers and patients were recruited. On the one hand, all volunteers were Caucasian men and women, between 18 and 30 years old, with no facial pathology known. On the other hand, patients were Caucasian men and women with facial pathology. For each volunteer and each patient, a 3D model of the face was generated using a stereo photogrammetry technique (Vectra M3 Imaging System, Canfield Scientific, Parsippany, NJ, USA).
Later, a perforated mask was 3D printed (Form 2, Formlabs, Somerville, MA, USA) so that the markers could be placed precisely on the face, using hypoallergenic glue. Moreover, rigid dental support made by a professional prosthetic defined the head's reference frame to disregard the head movements. During the session, each volunteer and each patient were asked to perform the 5 facial movements. Lastly, the movements were exported in a comma-separated value (csv) file format. The protocol used in the current study was approved by the Local Independent Ethics Committee (CPP Nord-Ouest II, Amiens, France) under references ID-RCB 2011-A00532-39/2011-23 and ID-RCB 2016-A00716-45/2016-55, registered at ClinicalTrials. gov (NCT02002572 and NCT03115203), and performed in accordance with the ethical standards of the 1964 Helsinki Declaration and its subsequent revisions.
All participants provided written informed consent for study participation. For further details of the data acquisition process, please refer to  [42]. Although the 5 movements previously described were recorded for each participant, this study focuses on the broad smile movement, as its production leads to large muscle displacements. For this purpose, 52 markers of the lower third of the face were chosen (highlighted in Figure  2 ) to be analyzed further. This consideration was implemented to reduce the complexity of the anomaly detection task, given the small number of csv samples on the dataset.
Datasets Firstly, the training and validation datasets, which represent 70% of the smiles, were generated from healthy smiles only (n = 25 and n = 7, respectively). These datasets were used to compute the baseline and train the deep learning model. Then, the test dataset was generated from 4 healthy smiles (H-test) and 9 patients' smiles (P-test). The latter smiles were produced by 3 facial palsy patients and 1 facial transplantation patients. This dataset, which represents the 30% of the smiles, is used to evaluate both models. It is important to notice that the latter smiles were produced by volunteers that suffer from facial palsy. Specifically, all the healthy smiles samples were collected from 2014 to 2017 as previously described in  [35, 36, 43, [45] [46] [47].
Models Two models are considered to evaluate the facial movement of healthy and pathological smiles: the baseline and the LSTM model. In brief, we compare the traditional approach  [39] , based on a statistical model, with a more complex model. Specifically, our LSTM model was a multivariate time series forecaster that follows a seq-to-vector  [48]  architecture. Although other deep learning models, such as multi-layer perceptron (MLP)  [49] , CNN, recurrent neural network (RNN)  [50] , and LSTM-CNN  [51] , were evaluated for this task, we decided only to include LSTM because its prediction better fitted the healthy smiles on the dataset. Similarly to  [52] , LSTM showed to be the best anomaly detector using sequential data by computing lower errors than other deep learning models.
Results This section presents the results of three experiments: (i) LSTM's training and evaluation, (ii) facial movement assessments comparison between LSTM and baseline, and (iii) LSTM model deployment on clinician diagnosis through a GUI. All the processes carried out in this study were executed on the same computer whose technical specifications are detailed in Table  1. The goal of the training is to find the parameters that minimize the cost (or degree of anomaly) on the training dataset. The training's performance of the LSTM model is shown in Figure  5. The model achieved a performance of 0. 0268, 0. 0469, 0. 0372, 0. 0685, for the training, validation, H-test, and P-test datasets, respectively. Some LSTM model's predictions on the right and left commissure markers, for the H-test and P-Test, are presented in Figure  6.
The LSTM model's standard deviations were: 0. 0119, 0. 0274, 0. 0174, and 0. 0362 for the training, validation, H-Test, and P-Test datasets, respectively. Next, the baseline and the LSTM models evaluate the test datasets (Table  2 ) by computing the degree of anomaly (Equation (  8 )). Figure  7  illustrates the evaluation, carried out by both models, on the left oral commissure marker of a smile that belongs to the H-Test. In the view of the results presented here, we built a GUI for facial movement assessment to evaluate its deployment in clinical practice. Therefore, we created DeepSmile (Figure  8 ), which is an open-source software that assesses facial movement during a smile by running the trained LSTM model as an executable file. DeepSmile uses the csv file as the input to provide a report of its facial movement assessment with the following information: the patient's data; the performance of each marker (much as in Figure  6 ); a normalized and metric (in mm) degree of anomaly; a discrete indicator of relevant anomaly based on the normalized degree of anomaly relative to a predefined threshold.
Discussion In short, we have addressed a facial movement assessment problem as a non-linear optimization task rather than a classification task  [57]  to avoid a certain level of subjectivity, ex. the classes being defined by the grades of the House-Brackmann system. Furthermore, an anomaly detector is able to precisely track the degree of anomaly of a patient during follow-up which is expected to decrease over time if the rehabilition is successful. As stated in  [52] , LSTM models outperform other machine learning algorithms when sequential data is involved in anomaly detection tasks. On the one hand, the LSTM model is trained to minimize the degree of anomaly when evaluating the healthy smiles on the training dataset. Thus, its predictions are adapted to fit healthy smiles (Figure  6 ) and flag up a higher degree of anomalies for the patients' smiles.
On the other hand, the baseline computes a single smile as the average of the training dataset. Hence, its assessment relies on a reference smile which does not fit other healthy smiles. Consequently, we consider that the LSTM's evaluations outperform those of the statistical model commonly used in the literature. Figure  7  illustrates an example where the LSTM's prediction is well adapted to evaluate healthy smiles whereas the baseline is not. Nonetheless, we consider that further investigation on LSTM variants, such as LSTM auto-encoders  [58] , should be carried out to exploit sequential data collected by motion capture system which might contain some null values. Similarly to clinical diagnoses, the variation of the LSTM model's assessment is lower with healthy smiles than with patients' smiles.
Indeed, the weights related to the selected markers were higher than the rest when training the deep learning model. Another challenge related to our dataset is that, so far, our deep learning model is trained on healthy smiles produced by Caucasian volunteers only. Additionally, we observed in some patients a passive displacement of markers placed on the paralyzed side. Indeed, the markers were attracted in the direction of the non-paralyzed side by the soft tissue traction phenomenon. Therefore, we concluded that the displacement feature might not fully model abnormal movement, and another feature that includes the direction of movement should be considered. The GUI we have developed calculates the level of anomaly in millimeters as well as in percentage for all the markers selected. It is, therefore, a global indicator of facial mobility, which can be used for the longitudinal follow-up of patients to quantify the evolution of paralysis.
Introduction Phoneme pronunciation is one of the most important basic skills for foreign language learning. Practicing pronunciations in a computer-assisted way is helpful in self-directed or long-distance learning environments  [1]. The computer-assisted pronunciation training (CAPT) programs record and analyze user speech acoustically, comparing their pronunciation and prosody with a native speaker sample using visual feedback. Although users often require additional training to ensure that they can interpret the feedback, such programs can be used to improve their prosody and vowel pronunciation  [2, 3]. Recent research projects indicate that machine learning provides nice opportunities to improve CAPT systems. From the view point of natural language processing, pronunciation diagnostic tasks are essentially acoustic pattern recognition problems  [4] , which have made great progress  [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16].
Badrinath and Balakrishnan  [15]  present an automatic speech recognition model tailored to the air traffic control domain that can transcribe air traffic control voice to text. The transcribed text is used to extract operational information such as call-signs and runway numbers. The models are based on recent improvements in machine learning techniques for speech recognition and natural language processing. Jiang et al. [16]  applied the recent state-of-the-art DNN-based training methods to the automatic language proficiency evaluation system that combines various kinds of nonnative acoustic models and native ones. The reference-free rate is used as the machine score to estimate the second-language proficiency of the English learners. The evaluations based on the English-read-by-Japanese database demonstrate that it is an effective method to improve the language proficiency assessment techniques.
These successful cases significantly improved the products in different scenarios. This work focuses on the French CAPT embedded solutions with the goals of high development productivity and running efficiency performance. It is conducted by the Algorithm-Architecture Adequation (AAA) methodology, first introduced by the AOSTE team of INRIA (French National Institute for computer science and applied mathematics)  [26]. The key feature of AAA is the ability to rapidly prototype complex real-time embedded applications based on automatic code generation. The concerned algorithm and its hardware architecture are studied simultaneously within a Software/Hardware co-design framework, which allows an embedded implementation optimized both in the algorithm and hardware level. Concerning the pronunciation diagnosis algorithm, a high-accuracy and low-consumption classifier is desired to balance accuracy and efficient performance.
For the purpose of high development productivity and maintainability, high-level synthesis techniques are developed. The work of E. Manor  [42]  demonstrates that this method is an important and effective solution for fast embedded prototyping with efficient performance. This work uses a recently-proposed very high-level synthesis (VHLS) based SW/HW co-design flow  [43, 44]  to facilitate the implementing process from Matlab to RTL. Moreover, different interface and parallel optimizations are made to accelerate the implementations. The evaluation experiment in this paper is conducted using a data set including 35 phonemes ×6 sessions ×23 persons = 4830 samples. The experiment results show that the outputs of the final RTL implementation are exactly the same as its Matlab prototype, implying that the Matlab-to-RTL synthesis process of this work is reliable.