dataesr/scientific-paragraphs-categorization huggingface dataset:
For this new project, we also rely on JSPatcher. Users can graphically design and execute DSP algorithms using domain-specific languages (DSL) for audio processing such as Faust or Gen. These algorithms are executed in a dedicated high-priority thread called an AudioWorklet. This application can also be utilized to design interactive programs and shareable digital artworks online, incorporating other JavaScript language features, Web APIs, web-based audio plugins, or external JavaScript modules. Typical BCI software such as BCI2000  [13]  or OpenBCI 1  can be used for transferring brain wave data through the UDP network protocol with the OSC format. We first forward the data through WebSocket protocol, possibly with a local server, then capture it in the browser. The peaks in the brain wave signal are then used to trigger the web-based synthesizer built in JSPatcher, which has access to the WebSocket API for processing the incoming brain wave signal.
To process the signal, a patcher is created with a web browser using the JSPatcher web application 2. When a patcher is hosted on an online server, a URL can be used to prompt JSPatcher to open the patcher program in run-time mode, displaying user interface elements and providing a usable application for end-users, as opposed to the "editing mode. " The generated web application 3  can be used to adjust the rhythm, harmony, and timbre of the sound. These adjustments can be performed manually (using GUI elements like buttons, knobs, and sliders, etc. ) or automatically over time. The synthesizer part is created from Faust DSP. Faust is a functional, synchronous, domain-specific programming language designed for real-time audio signal processing and synthesis  [3]. Thanks to the Emscripten transpiler and the WebAssembly format, the Faust compiler is available as a JavaScript module named faustwasm  [7]  which can compile Faust code to a fully functional WebAudio AudioWorklet node, directly in the browser.
We provide the practical results of a C implementation and compare the performance improvement provided by our new gadgets with those from [BBE + 18],  [SPOG19] , and [ABC + 22]. For a non-bitsliced implementation, our techniques achieve a significant speedup compared to previous work. In particular, our new Boolean-to-arithmetic masking algorithm leads to a substantial improvement over the techniques presented in  [SPOG19]  and [BBE + 18]. Our improved approaches for masking the Decompose algorithm of Dilithium also provides better efficiency than the ones presented in [ABC + 22]. The plain C code is publicly available at https://github. com/fragerar/Masked_Dilithium Comparison with [ABC + 22]. In the following, we provide a more detailed comparison of our contributions with those of [ABC + 22].
Similarly, for the masking of Decompose, we describe improved gadgets in Section 5, which can leverage our more lightweight ShiftMod arithmetic shift algorithm. Our ShiftMod gadget is more efficient compared to the heavier arithmetic to Boolean conversion from [BBE + 18] used in [ABC + 22], but it is not compatible with bitslicing. Moreover, the authors of [ABC + 22] provide a complete benchmark for an ARM Cortex-M4 microcontroller for the full signature generation, while we only provide a C implementation for laptop execution. However, we provide a public implementation, whereas the source code for [ABC + 22] is not available. In summary, the main difference with [ABC + 22] is that we provide more efficient gadgets for a non-bitsliced implementation, whereas [ABC + 22] use more standard gadgets for which they can leverage the state-of-the-art bitsliced implementation from  [BC22].
Pseudo-code of Dilithium We first recall the pseudo-code of Dilithium in Fig. 1  In this version, one computes w 1 := HighBits q (w, 2γ 2 ) and r 0 := LowBits q (w -cs 2 , 2γ), and performs the rejection sampling on r 0. On the other hand, the r-version comes from the reference implementation, as discussed in [BDK + 21, Section 5. 1], and formally described in [ABC + 22, Appendix A]. We recall its pseudo-code description in Fig. 1. In this r-version, one first computes (w 0 , w 1 ) ← Decompose q (w, 2γ 2 ) at Line 5, and then computes r := w 0 -cs 2 at Line 9. Finally, one performs the rejection sampling on r at Line 10. In the rest of this paper, as in [ABC + 22], we consider this r-version because it is easier to mask. We refer to [BDK + 21] for the definition of the UseHint and MakeHint algorithms.
The interest in quantum information processing has given rise to the development of programming languages and tools that facilitate the design and simulation of quantum circuits. However, since the quantum theory is fundamentally based on linear algebra, these high-level languages partially hide the underlying structure of quantum systems. We show that in certain cases of practical interest, keeping a handle on the matrix representation of the quantum systems is a fruitful approach because it allows the use of powerful tools of linear algebra to better understand their behavior and to better implement simulation programs. We especially focus on the Joint EigenValue Decomposition (JEVD). After giving a theoretical description of this method, which aims at finding a common basis of eigenvectors of a set of matrices, we show how it can easily be implemented on a Matrix-oriented programming language, such as Matlab (or, equivalently, Octave).
Joint eigenspaces and joint eigenvalue decomposition (JEVD) The eigenvalue decomposition of a unitary matrix A is: A ¼ VDV * ( 12 ) where D is a diagonal matrix, the diagonal of which contains the eigenvalues, and V is a unitary matrix whose columns are the eigenvectors. Let us note E A λ the eigenspace of an operator A associated with an eigenvalue λ: The joint eigenspace E A,B λ,μ is: E A,B λ,μ ¼ E A λ ∩E B μ ( 13 ) A property of great interest in quantum information processing is that within E A,B λ,μ (and even within any union of joint eigenspaces) the operators A and B commute. Determination of the joint eigenspace on a computer may be determined through the complement, because: E A λ ∩E B μ ¼ E A λ ÀÁ c ∪ E B μ c c ( 14 ) Using Matrix-oriented programming languages, such as Matlab or Octave, this requires only a few lines.
After that, the actions of poll and extension are repeated. The above-described iterative process is stopped once the measures of dominating volume and crowding distance are converged. Finally, a number of points lying in the Pareto front are obtained. In the present work, this algorithm is realized by using the function 'paretosearch' of MATLAB  [27]. Figure  2  demonstrates the specific concepts of MOO mentioned in the algorithm description by using some samples in a 2-objectives function space with the 2 objectives to be minimized. In the left part of the figure, sample F is referred to as dominated by B since B is better than F concerning all the objective functions. However, samples A, B, C, D, and E are considered as non-dominated sets because no one can dominate others. Then, the definition of rank is introduced.
Numerical Modelling The new model is applied to multiphase flow to account for the true behavior of phosphate slurry and its deformations that occur during this engineering instance. The simplest way to solve a two-fluid flow is to track the interface between the two fluid phases with a simple α indicator, often referred to in the literature as a concentration function. This method is called VOF (Volume-Of-Fluid) method, other approaches include Level-Set, Front Tracking, etc. twoLiquidMixingFoam  [30, 31]  is a well-established solver for the simulation of flows in which two incompressible fluids are present. A separate surface interface can be defined based on the VOF method in OpenFOAM, which is a free and open-source parallel processing software supported by a large user community  [27, 32].
Rheological Evaluation of the New Model In the present study, we used phosphate ore samples of different grades and concentrations of 51, 54, and 56 wt% in water. These samples were labeled S1 to S6 and different primarily in their solids concentrations. The details on the rheological data and samples characteristics can be found in  [40]. The rheograms of phosphate slurries were obtained, at room temperature, by applying a ramp of predefined shear rate decreasing from 1000 s -1 to 112 s -1 , and measuring the corresponding shear stress. The diameters of the rotating bob and the cylindrical cup are respectively 38. 713 mm and 44 mm. Prior to each measurement, the suspensions were stirred carefully in a vessel to wipe out material memory and obtain the same initial conditions for both samples and then rapidly filled into the external cylinder.
Numerical Results OpenFoam 9. 0, the open source CFD framework was used to solve the flow equations, turbulence models and transport equations. It is a very flexible CFD code where each component can be personalized to meet the user's needs. In single-phase flow calculations, the SIMPLE algorithm is used to couple pressure with velocity, whereas the PIMPLE algorithm is used in bi-phase simulations. In the single-phase simulations, the relaxation factors used are 0. 5 for U, k and and 0. 3 for the pressure. While, in the two-phase flow case, the relaxation factor for all variables is 1. GAMG is the linear solver used for pressure, and the smooth solver was adopted for U, k, and α.
Conclusions A new rheological constitutive relation for modeling the phosphate slurry flows was presented in this study. This model is based on five constant parameters, which were determined through rheological measurements. The validity of the model was assessed by comparing its outputs with data derived from stress test measurements. It was found that there was a good fit between the model and the measurements in the stress versus strain rate curves. The main advantages of this new model are that it can produce improved fits of the rheological data compared to other existing models, and that it provides a description of the rheological behavior of the phosphate suspension for a wide range of concentrations. This makes it a valuable tool for understanding and predicting the behavior of phosphate slurry flows in industrial settings and for optimizing the design and operation of systems that transport phosphate slurry.
( , 2019d Liu et al. ( , 2019b)). Supervised Re-ID demands the painstaking annotation of datasets. In the specific context of cow Re-ID, the impracticality and cost of annotating every cow in each farm necessitate the development of a Re-ID method capable of generalizing effectively across both labeled and unlabeled farms. This adaptability is crucial to accommodate the introduction of new cows into established farms and the deployment of the technology in novel farm environments. However, Re-ID grapples with a notable decline in performance when the test image distribution diverges from that of the training dataset. To address these challenges, Unsupervised Domain Adaptation (UDA) methods have been devised for Re-ID  Ge et al. (2019 Ge et al. ( , 2020)) ;  Dubourvieux et al. (2021a). UDA seeks to adapt a model to a domain of interest by leveraging an annotated dataset from another domain (the source domain) and unlabeled data from the domain of interest (the target domain).
While extensively explored for pedestrian and vehicle Re-ID, UDA proves particularly relevant in cow Re-ID applications, given the impracticality of annotating each cow in numerous farms. However, the unique constraints and requirements inherent in the cow Re-ID application have spurred further developments, which form the core focus of this paper. In cow Re-ID, each farm represents a distinct domain, characterized by its unique set of individuals, cameras, and environmental context. Consequently, cross-domain performance degradation becomes a pertinent issue. Additionally, each domain typically comprises a limited subset of animals, restricting the generalization potential of Re-ID networks trained on individual datasets, as in conventional UDA. In pursuit of enhancing the model's discriminatory capabilities among cows, we propose a novel framework: Cumulative Unsupervised Multi-Domain Adaptation  (CUMDA).
Driven by these practical considerations and the need for cross-domain cattle Re-ID solutions, this paper endeavors to design a cross-domain model tailored to the distinctive challenges of cattle Re-ID across multiple farms, an area that has seen limited study. Our aim is to develop such a method within the framework of CUMDA, emphasizing source conservation and the accumulation of knowledge from multiple unsupervised target domains. This paper comprises two primary contributions: • A Source-Guided CUMDA method, that can improve crossdomain re-ID performance, on one or multiple target domains, while being able to accumulate knowledge from multiple domains and preserve the source performance. • Extensive cross-dataset experiments for CUMDA re-ID on 2 public cow re-ID datasets and a private one.
Methodology Lower part: proposed pseudo-labeling method for multi-target CUMDA re-ID. Our goal is to design a CUMDA re-ID method that can improve re-ID performance on all seen domains. More specifically, it is expected that this method can: • specialize for one or multiple target domains to improve performance on them; • ensure good performance on the source domain. We also expect such a model to generalize well on an unseen new target domain, as it should accumulate knowledge from multiple domains. As illustrated in the upper part of Fig. 1 , existing pseudo-labeling methods are designed for UDA re-ID, i. e. to improve re-ID performance on a single target domain, using only data from this domain. Therefore, they need to be rethought in order to meet the previously mentioned objectives of CUMDA re-ID, and to incorporate the use of data from multiple domains.
This section introduces key elements of our CUMDA re-ID method. The lower part introduces our CUMDA re-ID method whose components will be motivated in this section. General notations. We consider a set of n target domains of interest T 1 ,. , T n , n ∈ N and a source domain S, from which a set of labeled data S from S, and unlabeled data T 1 ,. , T n from T 1 ,. , T n (the target domains) are available.
Pseudo-labeling by clustering A feature encoder f θ , θ ∈ R p , p ∈ N (usually a CNN) is trained on the labeled source dataset T, by minimizing a re-ID loss function (e. g. : Classification Loss, Triplet Loss as in  Hermans et al. (2017) , a combination of both as in  Luo et al. (2019) …) L ID θ, T ð Þ, w. r. t θ. Then, a clustering function C λ defined by hyperparameters (HP) λ ∈ R m , m ∈ N is used to predict pseudo-labels of data samples in each target set, by using the feature representation of their data. Pseudo-labeled target sets b T 1 ,. , b T n can then be obtained: ∀k ∈ 1, n ½ , b T k ¼ C λ f θ , T k ð Þ ð 1Þ This step, described by Eq. 1, is called Pseudo-Labeling by Clustering (PLC). These pseudo-labels will be used to define the loss that supervises the learning on the targets.
Improving pseudo-labels with multi-target automatic source-guided selection of Pseudo-labeling Hyperparameters Pseudo-labeling UDA approaches are sensitive to the quality of the proposed labeling, which depends on the good tuning of clustering hyperparameters λ. In the context of pedestrian and vehicle re-ID, the ideal λ value called λ * has been shown to depend on the target dataset distribution in the feature space, as well as the target dataset statistics (e. g. the number of shots per identity)  Dubourvieux et al. (2021b). Most of the works that focus on pedestrian and vehicle UDA re-ID reuse the same values empirically tuned for a specific cross-dataset experiment, on all different cross-datasets considered afterward. It has been shown that this can result in significantly reduced performance compared to getting a suitable value  Dubourvieux et al.
(2021b). For real world cow-re-ID, because the target is unlabeled, it is impossible to build a labeled validation set to tune this value. Besides, usual λ value used for person re-ID may not translate well to cow re-ID problem, given the particularities of cow datasets (color distribution, viewpoints …). Therefore, we propose to automate the tuning of λ from the labeled data. To do so, we use the HyperParameters Automated by Source & Similarities (HyPASS) algorithm  Dubourvieux et al. (2021b). HyPASS was designed and tested for single-target domain pedestrian and vehicle UDA re-ID. It optimizes clustering hyperparameters from the labeled data of the source validation dataset. More concretely, HyPASS estimates by model selection on C λ , the value λ * such as λ Ã ¼ arg max λ QðC λ ; S val Þ where Q is a clustering quality function and S val a labeled validation set from the source data.
It is illustrated in Fig. 1  as source-guided auto HP tuning. HyPASS-SC for CUMDA: improving the robustness to domain gap. In this paper, we adapt HyPASS to our cow re-ID CUMDA problem, by selecting a specific value λ k for each target dataset T k. The PLC defined by Eq. 1, is redefined as a Domain-specific PLC given by: ∀k ∈ 1, n ½ , b T k ¼ C λ k f θ , T k ð Þ : ð3Þ HyPASS functioning relies on domain-gap reduction. In the multitarget use-case, we propose to achieve it in two ways: • At the feature level, target-specific DSBN is leveraged to reduce the domain-gap in the feature space (cf. section 3. 3); • At the dataset statistics level, a new Source validation Calibration (SC) approach is proposed. While cross-dataset statistic gap may be overlooked for an academic person and vehicle re-ID such as in  Dubourvieux et al.
(2021b) , it becomes crucial in the considered cow re-ID problematic. Indeed, in the well-known person re-ID datasets, usual statistics discrepancies are    (2019)  and  MSMT17 Wei et al. (2018b) ). However, that does not hold true in all cases. Especially in scarcer animal-related re-ID, where the data may be difficult to acquire, resulting in higher discrepancies in shots per ID. Moreover, contrary to person or vehicle re-ID applications in open-world, the number of cows in a farm of interest is generally known, or can be easily estimated for a cross-domain re-ID applications. This allows us to design SC for cattle re-ID, which consists in equalizing the number of shots per ID of the source to match that of the target. SC generates target-specific source validation sets S val k from S val , that reduce the cross-dataset statistics gap with the corresponding target training set T k.
Cows2021 Cows2021 Gao et al. (  2021 ) is a dataset featuring RGB images and videos of 186 individuals. The data was acquired from 4 m above the ground by a pinhole camera pointed downwards. Image extraction. The images were extracted over one month of acquisition. The extraction of cow images from the video stream relies on an oriented bounding-box detector and a tracker. The boxes are centered around cow torsos, excluding their heads, with all individuals facing right. For more details on data acquisition, please refer to  Gao et al. (2021). IDs & samples. In this study, labeled annotations for initial supervised training are needed for relevant performance comparisons with unsupervised UDA. Therefore, only its labeled data is used. A total of 8670 images depicting 181 distinct individuals were extracted, for an average of 48 shots per identity.
HolsteinCattleRecognition HolsteinCattleRecognition Bhole et al. (  2019 ) is a dataset featuring RGB and infrared images of 1237 individuals. The data was acquired by a pinhole camera placed at gound level, 5 m away from the milking machine it films. For concision, we refer to it as HolsteinCattle in the rest of the paper. Image extraction. The images were extracted over nine days of acquisition. Each of them contains a single cow in the milking machine. For more details on data acquisition, please refer to  Bhole et al. (2019). IDs & samples. In this study, only the RGB data is used. A total of 1227 images depicting 136 distinct individuals were extracted, for an average of 9 shots per identity. More details on image repartition can be found in Table  1. Complexity. This dataset features partially occluded cattle positioned differently in the milking machine.
CowFisheye CowFisheye is a private dataset featuring RGB images of 78 individuals. It was acquired from a single farm from 4 fisheye cameras pointing downwards, positioned 6 m above the ground. Identities were annoted manually. This dataset reflects the usual challenging data encountered in the use case where cows must be identified 24/7 wherever they are in the farm. Image extraction. Images were extracted over 6 days of acquisition, during both day and night. A detector gives images containing the whole cow body and head, aligned horizontally and facing right. IDs & samples. Manual selection and annotation of images were done to ensure a good variability of viewpoints and lighting conditions for each cow. A total of 8709 images depicting 78 distinct individuals were extracted for an average of 112 instances per identity.
More details on images repartition can be found in Table  1  and Fig. 3. Complexity. The CowFisheye dataset complexity reflects the desired application: re-ID for 24/7 monitoring of cows in the whole camera network. More precisely, the low angle-shot camera configuration required for coverage of the whole farm, may introduce significant cow occlusion by obstacles or other individuals. Distortions inherent to fisheye cameras are also present. Besides, the acquisition is done in varied illumination conditions, which can cause significant discrepancies in the appearance of a cow. At night specifically, a near-infrared mode is activated resulting in black and white pictures. An illustration of the complexity of the CowFisheye dataset is proposed in Fig. 4.
Experimental settings 4. 2. 1. Use case Our use case is specific to re-ID of animals in multiple farms, with labeled images from one farm, and one or many unlabeled images from multiple farms. The objective of our CUMDA re-ID method presented in Sec. 3 is twofold:  • conservation on the source (labeled) domain; • specialization on the target (unlabeled) domains. We also expect better generalization on a new unseen target domain which would correspond to a new farm in a real world application. Therefore, for each training, performance on all three datasets is reported. Throughout the experiments, we evaluate the different components of our CUMDA method: source guidance (cf. Sec. 3. 2), DSBN (cf. Sec. 3. 3) and HyPASS-SC (cf. Sec. 3. 4). Please note that this work does not aim at optimizing the network architecture or tuning hyperparameters, it rather proposes an methodology for efficient CUMDA re-ID by pseudo-labeling.
Data preprocessing Per domain, mini-batches of size 16 are built with P = 4 identities and K = 4 shots per identity. CUMDA batches may vary in size as they are constructed from one mini-batch for the source dataset and one for each target dataset, when applicable. Thus, their size depends on n domain , the number of domains used during training. Here, the batch size is equal to 16 Â n domain. Images are resized to 128 Â 128 pixels. Re-ID related data augmentations such as crop and flip are applied during the training stage. Random erasing was not applied because it experimentally decreased the cow re-ID performance.