dataesr/scientific-paragraphs-categorization huggingface dataset:
The SmartSPEC approach In this section, we describe SmartSPEC, a framework with an event-driven approach that exploits semantics to generate realistic synthetic smart space datasets. SmartSPEC utilizes a semantic model (see Section 3. 1) of four highly interrelated entities to represent a smart space: (i) spaces, which constitute the geographical layout of the smart space; (ii) people, who represent the inhabitants of spaces; (iii) semantic events, which describe the actions of people in spaces; and (iv) sensors, which observe the various phenomena in the space. In general, we assume that the sensors deployed in this instrumented smart space will produce observations that are saved in a smart space ''seed'' dataset. SmartSPEC will then extract relevant patterns/concepts (i. e. , semantics) about the entities encoded in the dataset and apply them to generate new, synthetic datasets.
Top-level applications can leverage these datasets for robust testing and validation purposes. The overall SmartSPEC architecture is presented in Fig. 1 , and consists of two main components. First, the Scenario Learning component (see Section 4) will take the sensor seed dataset, along with models of the underlying smart space and its instrumented sensors, to learn about the interactions and activities occurring within the space. Aspects of three different concepts are extracted as a result: (i) semantic events and the general types of events that are present in the seed dataset (via the Event Learner); (ii) observed people and the general profiles of people attending these events (via the People-Event Interaction Learner); and (iii) individual trajectories and spatiotemporal properties on the manner in which people move between spaces (via the MetaTrajectory Learner).
In our system, we refer to the types of events, profiles of people, and properties of trajectories as metaevents, metapeople, and metatrajectories, respectively. Collectively, these serve as the metamodels to describe the semantics about the general scenario captured in the seed dataset. SmartSPEC uses these metamodels to generate new, synthetic smart space datasets in the Scenario Generation component (see  Section 5). This first consists of creating a new set of events/people, which are derived from the previously learned metaevents/metapeople models (via the Entity Generator). Then, the Trajectory Generator produces new semantic trajectories of people attending events over time. The presence of people as they move through the smart space is captured by the Sensor Observation Generator, which produces corresponding sensor data.
SmartSPEC semantic data models SmartSPEC relies upon a semantic modeling of the four smart space entities above to represent the activities and operations occurring in the space, as shown in Fig. 2. This consists of a set of Spaces C, People P, Events E and Sensors S, which capture important attributes necessary to generate a new, realistic, but synthetic dataset. To describe the general scenario from which these datasets were generated, SmartSPEC defines the concept of MetaEvents ME and MetaPeople MP, which express the types of events and profiles of people present in the scenario, respectively. Below, we describe each smart space semantic model using an ongoing example of a university campus. In this scenario, professors and students move to lecture hall, classroom, and office spaces to attend semantic events such as meetings, lectures and seminars.
User-defined constraints between smart space entities While the smart space models presented in Section 3. 1 are flexible and can capture semantics that dictate the activities and operations within the space, realistically generating data for a range of different domains can require additional rules and constraints on the underlying smart space entities. For example, to accurately model the behavior of people at airport security checkpoints, it is necessary to encode rules that limit the movement of passengers across these checkpoints to at most once. Certain spaces may also need to have restricted access (e. g. , airplane gates, etc. ). To capture external domain knowledge and generate realistic data for a wide variety of IoT scenarios, SmartSPEC presents rules and constraints defined by a human-in-the-loop.
An example is shown in Fig. 3(b). In general, work in utilizing constraints to model activities (e. g,. people) has been studied in the context of cyberphysical human systems  [38, 39]. These models specify a language to define specific objects of interest, their attributes, and a series of related constraints, with the goal of representing the behavior of a physical system that satisfies the model. Constraints are useful for the realistic generation of data for customized spaces in SmartSPEC. Note that these constraints need to be integrated with the semantics of the underlying smart space and not conflict with other specifications associated with the smart space. To address conflicts in SmartSPEC, we impose a partial ordering that determines which constraint is enforced. In particular, constraints that are more granular (i.
Using SmartSPEC The three modes of operation of SmartSPEC to generate a smart space dataset are represented in Fig. 4. These modes vary in the level of user involvement/automation and control with respect to the generation of models and metamodels for both people and events. First, the user defines the relevant Space and Sensor entities for their desired scenario in 1. Then, relevant metamodels for people and events must be defined: this can be done manually 2a or automatically (with the Scenario Learning component of SmartSPEC) 2b. Users may modify the automatically generated metamodels if  desired. After metamodels are defined, the user can either manually define a corresponding set of people and events 3a, or use the entity generator in 3b to do that automatically. Once again, the produced entities can be modified if desired.
Scenario learning in SmartSPEC To learn semantic events and people, SmartSPEC uses a sensor observation seed dataset, as well as models of the underlying smart space and its deployed sensors. We assume such datasets and models are collected/obtained before running SmartSPEC. Change point detection  [41]  is first utilized to first extract individual events from occupancy count measurements. The resulting log of events are leveraged to define individual people and the list of events attended. We later apply agglomerative clustering techniques  [42]  to characterize the types of events (which we refer to as metaevents), and profiles of people (which we refer to as metapeople) from the seed dataset. Lastly, time-series methods are applied to the sensor observation dataset to derive metatrajectory models, which dictate the manner in which people move between spaces.
We define a connectivity log dataset D to consist of a time-series of triples (dt, P, C ), denoting that person P was in space C at datetime dt. Dataset D can be readily derived from wireless connectivity technologies such as WiFi, Bluetooth beacons, and cellular  [43]. Such technologies are pervasive and available in many smart spaces -e. g. , buildings usually have WiFi Access Points (APs) deployed to provide Internet connectivity. Note that to obtain a more realistic output from SmartSPEC, D should be extracted from a scenario for which we want to generate the synthetic dataset. While one could potentially utilize a connectivity dataset obtained from one scenario for a new scenario, bias and spurious correlations must first be removed from SmartSPEC data (e. g. , by using techniques such as in  [44] ), although doing so is out of the scope of this paper.
g. , for b = 10, we count the number of people from 8:00-8:10, 8:10-8:20, etc. ). We then apply a change point detection algorithm on the resulting occupancy time-series to produce breakpoints denoting when events start and end. In our implementation of SmartSPEC, we use a change point detection Python package called ruptures  [46]. The attendance requirements att e are learned after people are defined; normal distribution parameters (i. e. , mean, stdev) are computed for each metaperson that attended the event. We use agglomerative clustering with single linkage to cluster events into metaevent groups. This unsupervised ML model starts by initializing clusters for each event; clusters are then merged together in order of closest distance. We define the distance between two events as the weighted sum of: the difference between respective start/end times and the Jaccard Index metric between attendees.
Trajectory generation SmartSPEC generates semantic trajectory datasets by simulating people who attend events during the times that they are in the simulated space, as seen in Alg. 3. For each person P ∈ P and for each date and time d, t s , t e ∈ d s. d e , obtained from P's associated time profile (Lines 2-3), P will repeatedly: (i) choose an event to attend using the input semantic models (Lines 6-19); and (ii) move to attend the event (Lines 20-23). In the event selection process, P will first check for periodic events that they have previously attended (Line 6). If one exists, then they will compute a path to go to the event's host space (Line 7-8). Otherwise, P will find a set of new potential events to attend such that both physical constraints (i. e. , space capacity, travel time), and semantic constraints (i.
We provide a sample implementation of a water consumption sensor on GitHub  [  Overall, we note that aspects of the sensor data generation algorithms presented above -particularly the user-defined generation function -can be learned or derived for a specific sensor or scenario in theory. Databases with occupancy related behaviors captured by sensors, such as in  [47] , can be leveraged in this regard to study realistic interactions between the occupancy of people and their impact in the space. However, to apply this to other scenarios, more context must be given on the underlying smart space, and corresponding data must be available to observe. In general, this is difficult to accomplish in practice, as such data may not exist. In SmartSPEC, we address this problem by reducing it to one of understanding the relationship between the presence/absence of people on the phenomena observed by sensors.
Assessing realism of smart space datasets In this section, we will describe the methodology used to assess the degree of realism between two smart space datasets, as such a metric is not yet well-defined to the best of our knowledge. Consider two smart space datasets D and D ′ , such that D is a log of real-world phenomena, while D ′ is a synthetically generated log. Each dataset consists of a series of 3-tuples (P, C , dt) denoting the space C ∈ C that a person P ∈ P is in at datetime dt. We assume that both datasets take place in the same set of spaces C.
Space occupancy similarity We use occupancy of spaces as one of the mechanisms to assess the similarity of D and D ′ wrt. the behavior of people. Formally, we define the occupancy λ C ,ts,te D as the number of unique people in dataset D who are in the space C during the  time period (t s , t e ). We assume that this time period (t s , t e ) can be partitioned into B blocks b for which occupancy counts are measured; we denote the start/end times for each time period using t s (b), t e (b), for b ∈ B. We directly compare the difference in occupancy using the mean squared error, as seen in Eq. (1). OccDist(D, D ′ ) = 1 |C| |B| ∑ C ∈C ∑ b∈B ⏐ ⏐ ⏐λ C ,ts(b),te(b) D -λ C ,ts(b),te(b) D ′ ⏐ ⏐ ⏐ 2 (1).
People trajectory similarity Smart space datasets can also be compared by the semantic trajectories produced, as defined in Section 5. Given datasets D and D ′ , let δ (i) D and δ (j) D ′ denote the ith and jth semantic trajectory extracted from trajectory sets ∆ D and ∆ D ′ (corresponding to D, D ′ ), respectively. To isolate the effect of confounding variables in our similarity metric, we introduce the notion of control variables to partition ∆ D and ∆ D ′ into ''bins''. Let V be a set of control variables that we wish to keep constant between compared trajectories; we propose setting V to be the rounded time period (t s , t e ) for which a trajectory starts and ends (i. e. , discretizing the starting/ending times into intervals). That is, a bin corresponding to V = (t s , t e ) would contain trajectories starting around t s and ending around t e.
Interpreting dataset similarity While the metrics above help to quantify the similarity of smart space datasets D, D ′ , we must further define a methodology to interpret the similarity of the values obtained in order to determine the degree of realism between D, D ′. To this end, suppose that we split a real-world dataset D into multiple smaller datasets {D i } (e. g. , by the week in which the data was measured). Then, using D i as training data for the generator G, we can produce k simulated datasets D ′ i,k. Let RS i denote the set of values obtained by comparing the Real dataset D i against each Simulated dataset D ′ i,k , wrt. the metric described in Section 6. 1 or Section 6. 2. We also define RR i to be the set of values obtained by comparing D i against each of the other datasets D j , where j ̸ = i, i + 1.
Intuitively, RS i represents the distribution of similarity between synthetic datasets and real-world datasets, while RR i represents the distribution of similarity between only real-world datasets. This process is depicted in Fig. 8. Note that comparing RR i with RS i tests the similarity between synthetic data and the seed from which it was produced, while comparing RR i with RS j , where i ̸ = j tests the quality to which patterns have been learned from one dataset and applied to the next. After finding appropriate, we run an ANOVA test with significance level α, which produces a p-value; if p-value ≤ α, then the simulated dataset is distinguishable from the real dataset. Otherwise, there is not enough evidence to support the hypothesis that the simulated dataset is distinguishable from the real-world dataset.
Sensitivity analysis of the trajectory distance metric We analyze the sensitivity of the trajectory distance metric proposed above wrt. changes in their trajectories. We will show that the proposed trajectory distance metric using the Fréchet distance 1 is resistant against small deviations in spaces, up to a threshold set for each pair of matched trajectories. Intuitively, this enables the metric to express that multiple realistic scenarios can exist for a given real-world trajectory dataset, without penalizing for any and all deviations. Let ∆ P and ∆ Q denote sets of trajectories to compare using the trajectory distance metric proposed above. For ease of notation, we will use δ P and δ Q to denote arbitrary trajectories in ∆ P and ∆ Q , respectively. First, we define δ P = [C 1 P ,. C n P ] and δ Q = [C 1 Q ,.
Experiments We evaluate the realism of SmartSPEC using two real-world datasets: an instrumented smart campus building and a city-wide GPS dataset. Three sets of experiments are performed. First, we examine the quality of the models learned by the Scenario Learning component. Then, we show the realism of the generated trajectories of people and occupancy of spaces. Finally, we evaluate the synthetic sensor data produced by SmartSPEC under varying scenarios where the semantics of the underlying smart space are changed. Real-World Datasets. We evaluated the realism of datasets produced by SmartSPEC with respect to two real-world datasets. The first dataset contains WiFi connectivity events captured in a 6 floor campus building at University of California, Irvine, instrumented with 64 WiFi APs.
The building has 4 lecture halls, 10 classrooms, 125+ faculty offices, 90+ research labs, along with other facilities, as seen in Fig. 9 (a). Our dataset spanned 5 weeks and contained an average of 300 K device connections each week. We cleaned this dataset by removing entries that were outside of the range [8:00,21:00] to eliminate extreme outliers. Additionally, to reduce the effect of people who only pass by the building without attending any semantic events inside, we removed entries that connected fewer than 10 times in a week. Due to the intermittent nature in which devices connect to WiFi APs, we associated each connection with a validity period of 10 min, which assumes a person's spatial presence for at most 10 min. Then, we use the resulting connectivity dataset with the methodology in Section 6 to extract necessary aspects of smart space datasets for evaluation.
To show the generality of SmartSPEC, the second dataset we used contains GPS trajectories collected in Beijing, China by Microsoft Research Asia as part of the GeoLife project  [52]. Out of the 182 users spanning over 5 years featured in the dataset, we examine 63 users over ∼2 years who indicated walking in their trajectory logs, yielding an average of 36 K GPS logs per month. Fig. 9(b)  shows the GPS traces used. To define a notion of ''spaces'' from the GPS coordinates, we used OpenStreetMap  [53]  to extract 1,150 points of interest (POI) in the city of Beijing, and clustered each GPS coordinate to its nearest POI, yielding a connectivity dataset. Experimental Setup. In general, the campus dataset was partitioned into 5 periods of 1 week each, whereas the GeoLife dataset was partitioned into 28 periods of 1 month each.
However, users of SmartSPEC can modify our implementations to fit desired levels of realism as needed. Mobility Model Baselines. Smart space dataset generation is based on realistic semantic trajectories in SmartSPEC. We compared our trajectory generation approach against four heavily studied human mobility models commonly used in application domains requiring simulations (e. g. , transportation, urban planning, disaster management, etc. )  [54]. Each model realistically replicates human mobility while differing in the mechanism used to select the next space. In the Random Waypoint (RAND) mobility model  [18, 55, 56]  and its variants, people select the next space to visit at (mostly) random without any restrictions. The Brownian Motion (BROW) mobility model  [57, 58]  is similar to the RAND model, but constrains the next space to be adjacent to a person's current space.
In each visited space, a person spends 60 ± 20 minutes before selecting the next space. SmartSPEC learns such values for various profiles of people with the training smart space dataset. Synthetic Sensor Baselines. Two methods are commonly used in the research community to produce synthetic sensor data at scale: (i) statistical models (STAT), which produce sensor data that follows a particular statistical distribution with added Gaussian noise  [29, 30, 59] ; and (ii) seed-based models (SEED), which produce sensor data by using replication and modification techniques on existing data  [33] [34] [35]. In the STAT baseline, ML techniques are used to learn specific sensor models for each of the evaluated smart space sensors, based on the trajectories produced by SmartSPEC. To generate WiFi AP connection data, several ML models were trained: (i) a linear regression model for the expected time that a person spends in the smart space; (ii) a linear regression model for the expected duration in-between connections; and (iii) a Markov model for the next WiFi AP to which a person connects, given the current WiFi AP to which they are connected.
For the door sensor, a similar machine learning model was used to predict the next time that a person would activate the door sensor. To generate synthetic temperature data, a gradient boosting regression tree using XGBoost  [60]  was trained for each temperature sensor. Each ML model was selected empirically based on its suitability to the dataset under consideration. For the SEED baseline, we use the trajectory dataset produced by SmartSPEC as the seed from which sensor data is produced; each trajectory dataset is replicated once to increase the size of the dataset by 2, and then Gaussian noise is added to each entry in the dataset. For the WiFi AP and door sensor datasets, we started by deleting and duplicating 30% of the entries (to add variability), and then added 0 ± 5 minutes to the connection/ activation times.
Evaluating learned models SmartSPEC performs an event-driven generation of semantic trajectories where people move to spaces to attend events. We validate the process of learning metatrajectories by comparing generated trajectories against the expected path that individuals take (shortest path in graph). We evaluate learned events by their comparing event occupancy counts against ground truth. We perform this validation based on the campus dataset only, for which we know ground truth. MetaTrajectories. We evaluated the quality of the extracted metatrajectories, which describe the distribution of paths that a person can take between nonadjacent spaces. In particular, we compare the paths produced by the MetaTrajectory Learner against real paths extracted from data. The shortest path algorithm is used as a baseline.
Our evaluation followed the methodology shown in Fig. 8  -namely, we split the campus dataset into periods of 1 week and compared the current week against the consecutive week. Table  1  shows the distance between metatrajectories computed using Eq. (2). Our results show that the learning of metatrajectories by SmartSPEC results in realistic paths between non-adjacent spaces. In general, the shortest path resulted in realistic situations only when the source and destination spaces were  physically located near each other, with a small deviation between different paths. On the other hand, the metatrajectories produced from SmartSPEC have a very similar distribution to that of real trajectories; we find that the average difference between real-world trajectories and shortest path trajectories is much greater than when using SmartSPEC.
g. , wait in lobby), which helps explain the heavy tails. A visual of the start/end times for learned events in a space ''3141-clwb-1100'' on 2018-01-22 is shown in Fig. 11. Here, the underlying blue line reports the device connection count from the input WiFi connectivity dataset, and the blue/red stripes indicate partitions for the learned time periods. This reveals that SmartSPEC was able to identify time periods for which different events were held in the space.
Evaluating generated semantic trajectories We evaluate realism of the produced semantic trajectories for the two real-world datasets and compare them against each of the human mobility model baselines described earlier, using the methodology and metrics described in Section 4 and Section 6. We split the campus dataset into periods of 1 week and binned the extracted semantic trajectories using rounded half-hour intervals of start/end times as control variables (i. e. , each trajectory was characterized by the closest half-hour for which their start/end times fall). In Table  2 , we report the average similarity in semantic trajectories and its standard deviation across other simulated runs, measured as the distance (m) as explained in Section 6, over all bins. We add a row ''Real'' to Table  2  which represents the comparison of real semantic trajectories to each other.
The results show that, in general, SmartSPEC was able to produce semantic trajectories whose distance from extracted realworld semantic trajectories was close to that of other real-world semantic trajectories. On average, there was only a difference of 35% between the ''real'' dataset and the SmartSPEC dataset, while the others had an average percent change of 280%, 153%, 264%, and 208%, as listed. When comparing against SmartSPEC, the baselines produce trajectories whose average distance were 2. 8, 1. 9, 2. 7, and 2. 3 times larger, across all evaluated weeks. The standard deviations for SmartSPEC additionally show that the average trajectory similarity across the simulated scenarios for a specific week varies by an  average of 25. 84; this reflects that the produced scenarios are dynamic in nature with multiple potential combinations of trajectories, attended events, and people.