dataesr/scientific-paragraphs-categorization huggingface dataset:
Indeed, Chatfield et al. report 56. 3% for soft-BoV and 57. 6% for sparse coding with a slightly different setting. Comparison with the state-of-the-art. We now compare our results to some of the best published results on PAS-CAL VOC 2007. The comparison is provided in Table  3. For the FV, we considered results with SIFT only and with a late fusion of SIFT+LCS. In the latter case, we trained two separate classifiers, one using SIFT FVs and one using LCS FVs. Given an image, we compute the two scores and average them in a weighted fashion. The weight was crossvalidated on the validation data and the optimal combination was found to be 0. 6 × SIFT + 0. 4 × LCS. The late fusion of the SIFT and LCS FVs yields a performance of 63. 9%, using only the SIFT features obtains 61. 8%. We now provide more details on the performance of the other published methods.
Caltech 256 We now report results on Caltech 256 which contains approx. 30K images of 256 categories. As is standard practice, we run experiments with different numbers of training images per category: 5, 10, 15,. , 60. The remainder of the images is used for testing. To cross-validate the parameters, we use half of the training data for training, the other half for validation and then we retrain with the optimal parameters on the full training data. We repeat the experiments 10 times. We measure top-1 accuracy for each class and report the average as well as the standard deviation. In Figure  7 (a), we compare a soft-BoV baseline with the FV (using only SIFT descriptors) as a function of the number of training samples. For the soft-BoV, we use 32K Gaussians and for the FV 256 Gaussians. Hence both the BoV and FV representations are 128K-dimensional.
SUN 397 We now report results on the SUN 397 dataset  (Xiao et al, 2010)  which contains approx. 100K images of 397 categories. Following the protocol of  Xiao et al (2010) , we used 5, 10, 20 or 50 training samples per class and 50 samples per class for testing. To cross-validate the classifier parameters, we use half of the training data for training, the other half for validation and then we retrain with the optimal parameters on the full training data 5. We repeat the experiments 10 times using the partitions provided at the website of the   dataset. 6 We measure top-1 accuracy for each class and report the average as well as the standard deviation. As was the case for Caltech 256, we first compare in Figure  7 (b), a soft-BoV baseline with 32K Gaussians and the FV with 256 Gaussians using only SIFT descriptors.
Hence both the BoV and FV representations have the same dimensionality: 128K-dim. As was the case on the PASCAL VOC and Caltech datasets, the FV consistently outperforms the BoV and the performance difference increases when more training samples are available. 6 See http://people. csail. mit. edu/jxiao/SUN/ The only other results we are aware of on this dataset are those of its authors whose system combined 12 feature types  (Xiao et al, 2010). The comparison is reported in Table 5. We observe that the proposed FV performs significantly better than the baseline of  Xiao et al (2010) , even when using only SIFT descriptors.
Fisher vector compression with PQ codes Having now established that the FV is a competitive image representation, at least for small-to medium-scale problems, we now turn to the large-scale challenge. One of the major issues to address when scaling the FV to large amounts of data is the memory usage. As an example, in  Sánchez and Perronnin (2011)  we used FV representations with up to 512K dimensions. Using a 4 byte floating point representation, a single signature requires 2MB of storage. Storing the signatures for the approx. 1. 4M images of the ILSVRC 2010 dataset (Berg et al, 2010) would take almost 3TBs, and storing the signatures for the approx. 14M of the full ImageNet dataset  (Deng et al, 2009)  around 27TBs. We underline that this is not purely a storage problem. Handling TBs of data makes experimentation very difficult if not impractical.
The latter method, however, is a batch solver that accesses all data for every update of the weight vector, and is therefore less suitable for large scale problems. The major advantage of our SGDbased approach is that we decompress only one sample at a time, and typically do not even need to access the complete dataset to obtain good results. Especially, we can sample only a fraction of the negatives and still converge to a reasonably accurate solution. This proves to be a crucial property when handling very large datasets such as ImageNet10K, see Section 5.
Large-scale experiments We now report results on the large-scale ILSVRC 2010 and ImageNet10K datasets. The FV computation settings are almost identical to those of the small-scale experiments. The only two differences are the following ones. First, we do not make use of Spatial Pyramids and extract the FVs on the whole images to reduce the signature dimensionality and therefore speed-up the processing. Second, because of implementation issues, we found it easier to extract one SIFT FV and one LCS FV per image and to concatenate them using an early fusion strategy before feeding them to the SVM classifiers (while in our previous experiments, we trained two classifiers separately and peformed late fusion of the classifier scores). As for the SVM training, we also use SGD to train onevs-rest linear SVM classifiers.
ILSVRC 2010 ILSVRC 2010 (Berg et al, 2010) contains approx. 1. 4M images of 1K classes. We use the standard protocol which consists in training on the "train" set (1. 2M images), validating on the "val" set (50K images) and testing on the "test" set (150K) images. We report the top-5 classification accuracy (in %) as is standard practice on this dataset. Impact of compression parameters. We first study the impact of the compression parameters on the accuracy. We can vary the average number of bits per dimension b and the group size G. We show results on 4K-dim and 64K-dim FV features in Figure  8  (using respectively a GMM with 16 and 256 Gaussians). Only the training samples are compressed, not the test samples. In the case of the 4K FVs, we were able to run the uncompressed baseline as the uncompressed training set (approx.
Results are shown in Figure  9  for three losses: the quadratic and log losses which are twice differentiable and which are discussed in section 4. 4 and the hinge loss which corresponds to the SVM classifier but to which our theoretical analysis is not applicable. We also test two compression settings: our default setting with G =8 and b =1 and a lower-performing scalar quantization setting with G =1 and b =1. We can see that for all three losses the optimal regularization parameter is the same or very similar with and without compression. Especially, in the quadratic case, as opposed to what is suggested by our analysis, we do not manage to improve the accuracy with compressed features by cross-validating the regularization parameter. This might indicate that our analysis is too simple to represent real-world datasets and that we need to take into account more complex phenomena, e.
We follow the asymmetric testing strategy, where only the training images are PQ encoded and the test images are uncompressed. This has also been used for nearest neighbor image retrieval using an PQ encoded dataset and uncompressed query images  (Jégou et al, 2011). We compare three versions of the k-NN classifier. The first directly uses the PQ-encoded Fisher vectors. Note that since the PQ compression is lossy, the norm of the reconstructed vectors is generally not preserved. Since we use 2 normalized signatures, however, we can correct the norms after decompression. In the second version we re-normalize the decompressed vectors to have unit 2 norm on both parts corresponding to the SIFT and the LCS color descriptors. Finally, we consider a third variant that simply re-normalizes the complete vector, without taking into account that it consists of two subvectors that should have unit norm each.
Their system combined 6 sub-systems with different patch descriptors, patch encoding schemes and spatial pyramids. (Sánchez and Perronnin, 2011)  reported slightly better results -74. 5% top-5 accuracy -using 1Mdim FVs (with more Gaussians and spatial pyramids) but such high-dimensional features are significantly more costly than the 64K-dim features we used in the present paper. In a very recent work,  Krizhevsky et al (2012)  reported significantly better results using a deep learning network. They achieved an 83. 0% top-5 accuracy using a network with 8 layers. We note that to increase the size of the training setwhich was found to be necessary to train their large network -they used different data augmentation strategies (random cropping of sub-images and random perturbations of the illumination) which we did not use.
We compute the top-1 classification accuracy for each class and report the average per-class acuracy as is standard on this dataset  (Deng et al, 2010, Sánchez and Perronnin, 2011). Using the 4Kdim FVs, we achieve a top-1 accuracy of 14. 0% and using the 64K-dim FVs 21. 9%. Comparison with the state-of-the-art. Deng et al (2010) achive 6. 4% accuracy using a BoV representation and the fast Intesection kernel SVM (IKSVM) technique of  Maji and Berg (2009). Our compressed FV results are more than 3 times higher. Sánchez and Perronnin (2011)  reported a 16. 7% accuracy using FVs but without color information. Using similar features  Perronnin et al (2012)  improved these results to 19. 1% by carefully cross-validating the balance between the positive and negative samples, a good practice we also used in the current work.
r. t. the words in the vocabulary. The better use of the information provided by the model translates also into a more efficient representation, since much smaller vocabularies are required in order to achieve a given performance. We showed experimentally on three challenging small and medium-scale datasets that this additional information brings large improvements in terms of classification accuracy and, importantly, that stateof-the-art performances can be achieved with efficient linear classifiers. This makes the Fisher Vector well suited for large-scale classification. However, being very high-dimensional and dense, the Fisher Vector becomes impractical for large-scale applications due to storage limitations. We addressed this problem by using Product Quantization, which enables balancing accuracy, CPU cost, and memory usage.
We provided a theoretical analysis of the influence of Product Quantization on the classifier learning. For the linear case, we showed that compression using quantization has an "unregularization" effect that can be compensated by properly cross-validating the regularization parameters when learning the classifiers. Finally, we reported results on two large-scale datasetsincluding up to 9M images and 10K classes-and performed a detailed comparison with k-NN classification. We showed that Fisher Vectors can be compressed by a factor of 32 with a very little impact on classification accuracy. 9 While it is standard practice to report per-class accuracy on this dataset (see  Deng et al (2010) ,  Sánchez and Perronnin (2011) ),  Krizhevsky et al (2012) , Le et al (  2012 ) report a per-image accuracy.
4] [15] [16]  The devices are equipped with Bluetooth so that the information can be transferred automatically to the mobile phone. Via the interface of the mobile phone, feedback can be provided to the users regarding changes in their physical functioning; this can support them in their self-management. Furthermore, the mobile phone can transfer the data to a database that is accessible to care professionals who can use the information to provide pro-active care to their patients. The monitoring and feedback system is depicted in Figure  1. Previous research has shown that it is important that telecare technologies, such as the monitoring and feedback system described above, should meet the needs and preferences of the users. 17, 18 Furthermore, usability remains a critical issue in such telecare technologies,  11  because if elderly users are not able to use the monitoring system and mobile phone properly or do not understand the feedback that is presented via the mobile interface, it is unlikely that the system will be used to support self-management.
Notes: The monitoring and feedback system consists of three devices: a bathroom scale that measures weight and balance, a Grip-ball that measures grip strength, and a mobile phone with a built-in accelerometer that measures physical activity. Weight, balance and grip strength data are transferred to the mobile phone via Bluetooth. Via the screen of the mobile phone, feedback regarding (changes in) the physical indicators is provided to the elderly user. Besides that, all measurements are forwarded to a database that is accessible to care professionals. representatives; (2) analysis of users and their context; (3) identification of user requirements; (4) development of the interface; and (5) evaluation of the interface in the lab. Figure  2  provides an overview of the methods that were used during the different phases of the development process.
Examples of the items were: "I liked using the bathroom scale daily to measure my weight and balance"; "I needed a lot of help with using the mobile phone"; "I liked using the monitoring system"; and "Overall I am satisfied with the monitoring system". After 6-week follow-up, semi-structured interviews were conducted to gain insight into the experiences of the participants with the system. Topics discussed were: use of the bathroom scale and the mobile phone, feedback messages, satisfaction with the system, and usefulness of the system on a larger scale in the future. Finally, all weight, balance, and activity measurements were registered automatically using the mobile phone. These data were used to study the adherence to the daily monitoring regimen. Patient Preference and Adherence 2013:7.
Analyses Firstly, mean usability scores (standard deviation [SD]) were calculated for the total modified PSSUQ and its three subscales. Besides that, usability sumscores were calculated for each participant separately, higher scores indicated better usability. Secondly, the interviews were transcribed verbatim and analyzed using Nvivo version 9. 0 (QSR International Limited; Warrington, Cheshire, UK). Finally, adherence to the daily monitoring regimen was calculated by counting the number of days that data on all three physical indicators (weight, balance, and activity) were saved by the mobile phone and dividing this by the total number of days that a participant was included in the pilot study.
Examples of user responses: When everything works as it should, it's OK, then I am happy. Otherwise I panic a bit. (participant one, female, 84 years old) When the screen with the buttons (the application) disappears, it is quite a fuss to get things back like they were. (participant three, male, 79 years old) Use of system in the future Participants think that self-monitoring physical functioning with the system could be useful to other elderly people. They especially like the idea that the mobile phone can send their measurements to a database where their care professionals can see them. Example of user response: But I think it is a good system indeed that the doctor can use to keep an eye on things. (participant two, male, 80 years old). The participants also identified possible difficulties/ obstacles for the use of the monitoring and feedback system in the future.
Adherence to daily monitoring regimen Frequency calculations revealed that participant 1, 2, and 5 did not use the bathroom scales and mobile phone on 7 days (17%), 2 days (5%), and 13 days (35%) of the pilot study, respectively. Participant 3 used the monitoring and feedback system every day. No adherence rate was calculated for participants 4 and 6 because they dropped out of the study. The frequency data from the four participants who completed the pilot study resulted in an average adherence rate of 87% to the daily monitoring regimen.
Acknowledgments The authors would like to thank the representatives and advisors from the  House for Care  for their collaboration throughout this research project. Furthermore, the authors would like to thank all the members of the  Catholic Association for Elderly People  who participated in the workshop and/or the final in-lab evaluation of the usability of the interface. Also, the authors would like to thank the professionals for their input during the development process. Emmanuel Menard ,  Luc Rodrigues ,  Michael Mordefroy , and  Pauline Hourseau  from the  Université de Technologie de Troyes  are acknowledged for their contributions to the development of the interface and their technical support during the pilot study. Finally, the authors would like to thank the people who participated in the pilot study and the nurse practitioner of the  Expertise Center for Elderly Care of the Orbis Medical Center in Sittard  for her help in recruiting the participants.
The latter makes of Java-enabled solutions a perfect match for our needs, since any Java-based development is Write Once, Run Anywhere. Although the Java Virtual Machine (JVM) tends to become more and more efficient, the Java language itself evolves slower and several new languages running on top of the JVM appeared during the last few years, including Clojure, Groovy and Scala. These languages reduce code bloating and offer solutions to better handle concurrency and parallelism. Among JVM based languages, we have chosen to focus on Scala in this study because of its hybrid aspect: mixing both functional and object oriented paradigms. By doing so, Scala allows object-oriented developers to gently migrate to powerful functional constructs. Meanwhile, functional programming copes very well with parallelism due to its immutability principles.
That is why we rather consider OpenCL code generation instead of CUDA. The former having been designed as a cross-platform technology, it is consequently better suited for generic and automatic code production. First of all, let us make a brief recall on what is Scala. Scala is a programming language mixing two paradigms: object oriented and functional programming. Its main feature is that it runs on top of the Java Virtual Machine (JVM). In our case, it means that Scala developments can interoperate like clockwork with Java, thus allowing the wide range of simulations developed in Java to integrate Scala parts without being modified. The second asset of Scala is its compiler. In fact, Scalac (for Scala Compiler) offers the possibility to enhance its behavior through plugins. ScalaCL, which we will study later in this section, uses a compiler plugin to transform Scala code to OpenCL at compile time.
This mechanism offers great opportunities to generate code and the OpenCL proposal studied in this work is just a concrete example of what can be achieved when extending the Scala compiler. Finally, Scala presents a collection framework that intrinsically facilitates parallelization. As a matter of fact, Scala default collections are immutable: every time a function is applied to an immutable collection, this one remains unchanged and the result is a modified copy returned by the function. On the other hand, mutable collections are also available when explicitly summoned, albeit the Scala specification does not ensure any thread-safe access on these collections. Such an approach appears to be very interesting and efficient, when trying to parallelize an application, since no lock mechanisms are involved anymore.
Scala Parallel Collections Scala 2. 9 release introduced a new set of Parallel collections mirroring the classical ones. They have been described in  Prokopec et al. (2011). These parallel collections offer the same methods than their sequential equivalents, but the method execution will be automatically parallelized by a framework implementing a divide and conquer algorithm. The point is they integrate seamlessly in already existing source codes because the parallel operations have the same names as their sequential variants. As the parallel operations are implemented in separate classes they can be invoked if their data are in a parallel collection class. This is made possible thanks to a par method that returns a parallel equivalent of the sequential implementation of the collection still pointing to the same data.
The implementation lies in applying an operation to update each spin through two successive map invocations on the two-halves of the lattice. Not only this approach is crystal clear for the reader, but also it is quite easy to parallelize. Indeed, map can directly interact with the two Scala automatic parallelization frameworks presented earlier: Scala Parallel Collections and ScalaCL. Let us describe how the parallelization APIs integrate smoothly in already written Scala code with a concrete example. Listing 1 is a snippet of our Ising model implementation in charge of updating the whole lattice in a sequential fashion: 1 def processLattice(_lattice: Lattice)(implicit rng: Random) = 2 3 new Lattice { 4 val size = _lattice. size 5 val lattice = 6 IndexedSeq. concat ( 7 _lattice. filter{case((x, y), _) => isEven(x, y)}.
map(spin => processSpin( _lattice, spin)), 8 _lattice. filter{case((x, y), _) => isOdd(x, y)}. map(spin => processSpin( _lattice, spin))  9 ) Scala enables us to write both concise and expressive code, while keeping the most important parts of the algorithm exposed. Here, the two calls to map aiming at updating each half of the lattice can be noticed, they will process in turn all the elements within the subset they have received in input. This snippet suggests an obvious parallelization of this process thanks to the par method invocation. This call automatically provides the parallel equivalent of the collection, where all the elements will be treated in parallel by the mapped closure that processes the energy of the spins. The resulting code differs only by the extra call to the par method upstream of the map action, so as Listing 2 shows: An equivalent parallelization using ScalaCL is obtained just by replacing the par method by the cl one from the ScalaCL framework, thus enabling the code to run on GPUs.
Measures resulting from these runs are displayed in Table  3. Unfortunately, at the time of writing ScalaCL is not able to translate an application as complex as Schelling's segregation model to OpenCL yet. In the meantime, while ScalaCL managed to produce OpenCL versions of the Gap Model and the Ising Model, these two declinations were killed by the system before being able to complete their execution. Not only this last result show that the automatic prototypes approach gives significant results, when using Scala Parallel Collections, but this also validates the relevancy of the whole approach when considering the characteristics of the involved simulation model. In Table  1 , the Forest Gap Model had been stated as a model performing more data accesses than computations. Thus, it is logical than a parallelization attempt on GPU suffers from the latency related to memory accesses on this kind of architecture.
Conclusion In this work we have benchmarked two Scala proposals aiming at automatically parallelizing applications and their ability to help simulation practitioners to figure out the best target platform to parallelize their simulation on. The two frameworks have been detailed and compared: Scala parallel collections that automatically creates tasks, and execute them in parallel thanks to a pool of worker threads; ScalaCL, part of the nativelibs4java project, which intends to produce OpenCL code from Scala closures, and to run it on the most efficient device available, be it GPU or multicore CPU. Our study has stated that ScalaCL is still in its infancy and can only translate a limited set of Scala constructs to OpenCL at the time of writing. Although it is not able to produce a parallel prototype for a simulation yet, it deserves to be regarded as a future great language extension if it manages to improve its reliability.