Lecture 9 · AI4ST

Multi-Inhabitant HAR

Who opened the fridge — Alice or Bob? Data association, multi-label models, context-aware association with wearables, and subject separation. The single most exam-loaded lecture: simulation Q7 and the full open-ended Q24 live here.

⏱ ~55 min 📚 6 sections ✅ 10 MCQ + 2 open-ended ⭐ Includes sim Q7 + open-ended Q24
1

The Multi-Inhabitant Setting

Most HAR literature assumes a single-inhabitant home. Real homes have multiple subjects, who may perform:

🤝

Same activity in cooperation

Bob and Alice are cooking together

↔️

Individual activities in parallel

Alice watches TV while Bob waters the plants

👥

Group + individual in parallel

Alice & Bob cook, Carl & Dave watch TV, Erica reads

Applications beyond smart homes & healthcare: office automation (detecting meetings, presentations), building management, surveillance/security, work activities, smart retail (tracking multiple customers), sport.

Sensing recap — why environmental sensors?
Cameras would be great for multiple subjects, but too privacy-intrusive. Wearables alone detect physical activities but can't capture complex ADLs. Environmental sensors unobtrusively capture the residents' interaction with the home — this lecture mainly relies on them (Lecture 8!).
2

The Data Association Problem

The core problem — know it by heart for Q24
Environmental sensor events (stove turned on, fridge opened) cannot identify the inhabitant who triggered them. Fine with a single resident — a real problem with two or more. Data association = correctly associating each environmental sensor event to the inhabitant that triggered it. One of the most challenging problems limiting the deployment of real-world HAR systems in smart homes.

Example: Alice and Bob are in the kitchen. Alice relaxes at the dining table, Bob is cooking. A pressure sensor fires (someone sits), a magnetic sensor fires (fridge opened). Which event belongs to whom?

What the datasets look like

  • Event-level annotation (e.g., MARBLE): each sensor event carries the subject_id that triggered it — ideal, but prohibitive to annotate.
  • Activity-level annotation (e.g., CASAS): only activity start/end per resident (R1_Work_In_Room begin/end), with parallel activities interleaved — the most likely annotation scenario.

Data-driven data association

Train a classifier that associates each event to the resident who triggered it — then run a classic single-subject HAR model per subject.

Likelihood(Eventi triggered by Residentn) = P(Residentn) · P(Eventi | Residentn)
  • A naive probabilistic approach (Naive Bayes): P(Residentn) = the resident's probability of triggering events; P(Eventi|Residentn) = probability of that event for that resident. Eventi is a complex feature vector encoding spatial and temporal relationships with past events + time features (time of day, day of week…).
  • Extensions: e.g., LSTMs analyzing which events belong to which resident based on subject-specific patterns.
  • Drawbacks: needs a significant amount of labeled data about subject–sensor relationships, and the trained model is specific to one environment and set of subjects — it can't easily generalize to different settings.
3

Implicit DA: Multi-Label Models

Many methods skip explicit data association: a single model takes windows of sensor events (possibly mixing residents) and outputs the activity performed by each resident — data association happens implicitly, via multi-label models.

Multi-label ≠ multiclass

Multiclass

  • One label per input: y ∈ {c₁ … cL}

Multi-label

  • More than one output per input: y ⊆ {c₁ … cL}
  • Here the count is fixed: one activity per resident — and the labels are not independent!

The four approaches

MethodIdeaWatch out
1 · Factorized HMMOne independent probabilistic chain per resident (hidden = activity, observable = sensor event); the observable variables are shared between chains → introduces correlations between subjects' activitiesProbabilistic graphical models are computationally prohibitive beyond 2 subjects
2 · Combined labelsOne single-label multiclass classifier with a label per combination (A1A2 = R1 does A1, R2 does A2)Easy to implement, but with N residents and M labels the worst case is NM labels!
3 · Binary relevanceOne binary classifier per class; an activity is output if its classifier's confidence exceeds a thresholdDependencies between residents' activities are ignored
4 · Multi-output deep modelOne softmax output layer per resident on top of shared layers (e.g., hybrid CNN-LSTM) capturing spatio-temporal relationships between the residents' activitiesStill a multi-label model — see below
Problems of multi-label approaches — Q24b material!
They require a training set with all possible combinations of activities performed by multiple residents — not practical! They can't generalize to different homes with different residents and environments. And they suffer scalability problems: more residents or more activities significantly complicate training.
4

Context-Aware Data Association

Assume each resident has a wearable device: it tracks the wearer's identity, location (with indoor localization — Lecture 5!), and low-level physical activities (Lecture 7b!). This context can be used to perform data association without training models.

Wearable + positioning data Environmental sensor data Context aggregation Context-aware data association One stream per resident
  • Available contexts: the user's posture, micro-localization, gestures, etcetera.
  • A rule-based model defines relationships between sensor events and context based on common-sense knowledge (e.g., opening the fridge is necessarily done by a resident in the kitchen while standing) — often encoded in ontologies.
  • When an event fires, compute its context-consistency with each user's context; the event is associated with user u only if context-consistent.
The Alice & Bob example — straight from the slides
Events: fridge opened (E1), kitchen-chair pressure fired (E2). Bob: standing, in the kitchen → E1 compatible, E2 not. Alice: sitting, in the kitchen → E2 compatible, E1 not. Advantage: data association without requiring training!

Challenges

  • Often impractical to assume residents constantly wear wearables (especially elderly) — mitigated by miniaturized devices: smart clothes, smart rings, small BLE tags.
  • Accuracy is constrained by the accuracy of the collected context: precision of micro-localization, detectable postures/gestures/physical activities.
ThinkIn the context-aware approach, both Alice and Bob are standing in the kitchen when the fridge opens. What happens to the association, and which extra context could break the tie?
Answer: The fridge event is context-consistent with both users (both standing, both in the kitchen), so room-level rules alone cannot disambiguate. Finer context breaks the tie: micro-localization (who is physically next to the fridge) or a gesture detected by the smartwatch (an arm movement compatible with pulling a door) — exactly the contexts the wearable-driven pipeline aggregates. This ambiguity is also why subject separation stays hard when residents perform similar activities with similar sensors.
5

Subject Separation

Definition — the Q24a contrast
For some applications it's enough to understand the performed activities without associating them with the corresponding resident. Subject separation is this weaker form of data association: analyze the event stream just to determine which sensor events are likely triggered by different subjects — no identities involved.

Method 1 — Supervised seq2seq

  • Framed as a supervised seq2seq problem (Lecture 4!): the encoder maps sequences of sensor events into a latent space; the decoder separates them into per-subject sensor sequences, delimited by special tokens (SOS, EOS).
  • Drawback: detailed annotation is still needed!

Method 2 — Unsupervised

  • Assumption: in a first phase, unlabeled data can be collected when only a single resident is at home (detected automatically via PIR patterns or power consumption analysis) — not always realistic.
  • The single-resident data is mined for statistics: e.g., the frequency of sensor-event pairs triggered consecutively or temporally close (within a threshold ε; frequency = occurrences of the pair / occurrences of the first event).
  • Thresholds then decide if two events are likely triggered by the same resident — e.g., only pairs that occurred temporally close at least K times are attributed to the same resident.

Method 3 — Knowledge-based

  • Uses common-sense spatio-temporal knowledge: the semantic and temporal similarity of consecutive events decides (via a threshold) whether they come from the same resident: sim(sei, sej) = (simT, simS).
  • Temporal similarity: simT = max(0, 1 − |τ(sej) − τ(sei)| / Tmax), with Tmax the maximum time range considered (e.g., 24 h).
  • Semantic similarity from an ontology (objects, locations, persons): the similarity of two concepts uses the Least Common Subsumer (LCS) — the most specific shared ancestor: simC(c₁,c₂) = 2N₃ / (N₁+N₂+2N₃). simS averages the concept similarity of the events' locations and of their associated objects.
  • Similar consecutive events chain into the same parallel segment (fridge → stove: same subject; the computer event in the bedroom: another segment).

Challenges & what comes after

  • Still hard when residents perform similar activities with similar sensors (Alice sets the table while Bob cooks — both in the kitchen); may not scale with more residents.
  • After data association or subject separation: the output is one sensor stream per resident (identity attached only with data association) → apply any single-resident HAR method on each stream individually.
  • Group activities remain an open challenge: "same activity ⇒ group activity" is true only sometimes (two people cooking → probably together, one kitchen; two people watching TV → maybe different rooms). Context post-processing decides if an activity is collaborative.
6

Wearable-Only HAR & People Counting

Collective behavior (mobile/wearables only)

  • Inferring multiple subjects' behavior from their devices reveals coordinated movements: queues, unidirectional "lanes" in bi-directional pedestrian flows, intersections, groups gathered at a location.
  • Applications: emergencies (optimizing evacuation at large events) and smart-city management (urban planning, pedestrian navigation).

Distributed (centralized)

  • Each device recognizes its own individual activity (accelerometer) + contributes group cues (proximity with other subjects, direction)
  • A central server aggregates everything to recognize individual and group activities

Decentralized

  • No server: devices exchange information pairwise
  • Each device keeps a "who is walking with me" set; the sets converge to the walking groups ({1,3,4} and {2,5})

Counting people in smart buildings

  • Sometimes it's enough to count people, not recognize activities — e.g., occupancy patterns of office spaces for energy saving: HVAC, lighting and appliances adaptively controlled per space on short-term (hourly) usage changes (Lecture 6 energy!).
  • Idea: an array of PIR sensors pointing in different directions → infer the number of subjects and their direction (entering/exiting a room).
  • The raw analog voltage patterns feed a deep model; a multi-task supervised learner simultaneously predicts the number of people and their direction (with GAN-based data augmentation).
ThinkLecture 8 said PIR sensors are binary and motion-only. How can the people-counting approach extract the number of people and their direction from the same technology?
Answer: Two upgrades. First, it uses an array of PIRs pointing in different directions, not a single sensor — crossing the field of view in different directions produces different response patterns. Second, it doesn't threshold the sensor to a binary ON/OFF: it processes the raw analog voltage output with a deep multi-task model, which learns to predict the number of moving people and their walking direction from the waveform shapes. Same hardware, much richer signal.

Final Quiz — Exam Style

10 MCQs + 2 open-ended. Question 2 is the actual simulation Q7 and open-ended 11 is the actual simulation Q24 — both reproduced verbatim.

1
What is the data association problem in multi-inhabitant HAR?
AAssociating each activity label with its most likely time window
BLinking each environmental sensor to its position in the home map
CAssociating each sensor event to the inhabitant that triggered it
DMerging the streams of wearable and environmental sensors
C — environmental sensor events (stove on, fridge opened) cannot identify who triggered them; with two or more residents, each event must be correctly attributed. It is one of the most challenging problems limiting real-world smart-home HAR deployment.
2
Simulation exam · Q7
How can wearable devices (e.g., a smartwatch) simplify data association in multi-inhabitant settings?
ABy obtaining additional context information (e.g., micro-localization, gestures), it is possible to use them to perform knowledge-based data association without further training
BWearable devices can automatically detect the environmental sensors that are close to the user
CBy acquiring additional context information (e.g., micro-localization, gestures) it is possible to include them as additional features to train a data-driven data association model
DThere is no advantage of using wearable devices for data association
A — the wearable tracks identity, micro-localization, posture and gestures; a rule-based/knowledge-based model built on common-sense relationships (opening the fridge ⇒ in the kitchen, standing) checks the context-consistency of each event with each user — the slides stress the advantage explicitly: "performing data association without requiring training!". C is the trap: plausible-sounding, but the whole point of context-aware DA is avoiding the training that data-driven DA needs.
3
What distinguishes multi-label from multiclass classification?
AMulti-label handles more than two classes, multiclass only two
BMulti-label can attribute more than one output to the same input
CMulti-label requires deep models, multiclass works with any classifier
DMulti-label outputs probabilities, multiclass outputs hard decisions
B — multiclass: exactly one label per input (y ∈ {c₁…cL}); multi-label: a subset of labels (y ⊆ {c₁…cL}). In multi-inhabitant HAR the number of output labels is fixed (one activity per resident) and the labels are not independent. A confuses multiclass with binary classification.
4
In the Factorized HMM for two residents, how are correlations between the subjects' activities introduced?
ABy adding direct edges between the two hidden chains
BBy merging the two chains into one single hidden chain
CBy training the two chains on the same loss function
DBy sharing the same observable variables between the chains
D — each resident has an independent hidden chain (activity yRt), but the observable variables xt (sensor events) are the same for both chains: p(xt|y¹t,y²t) couples the residents. The joint also multiplies the per-resident transition probabilities p(yRt|yRt−1).
5
What is the main scalability issue of the "combined labels" approach?
AThe number of labels can explode combinatorially with residents and activities
BIt needs one separate classifier for every resident in the home
CIt can only be implemented with probabilistic graphical models
DIt cannot represent two residents doing the same activity
A — a label per activity combination (A1A2, A3A2…) is very easy to implement, but with N residents and M labels the worst case explodes to NM labels (slides' formulation). B describes binary relevance / multi-output models; the whole point of combined labels is using a single multiclass classifier.
6
What is the main drawback of binary relevance for multi-inhabitant HAR?
AIt cannot output more than one activity at a time
BIt requires the combined-labels training scheme
CIt ignores the dependencies between the residents' activities
DIt cannot use confidence thresholds on the outputs
C — binary relevance builds one independent binary classifier per class, outputting an activity when its confidence exceeds a threshold. Since classifiers are independent, the dependencies between activities of multiple residents are ignored — exactly what the multi-output deep model fixes with shared layers.
7
What is subject separation?
AAssigning each sensor event to the identity of the resident who triggered it
BDetermining which sensor events are likely triggered by different subjects, without identities
CPhysically separating the residents' devices onto different networks
DSplitting the dataset so each subject appears in only one fold
B — a weaker form of data association: when applications only need the performed activities, the stream is analyzed just to separate events of different subjects, without associating residents' identities. A is full data association; D is LOSO cross-validation (Lecture 7a)!
8
What is the key assumption of unsupervised subject separation?
AEvery resident wears a BLE tag during the whole first phase
BThe number of residents in the home is always exactly two
CEach sensor can be triggered by only one specific resident
DAn initial phase can collect data while a single resident is at home
D — unlabeled single-resident data (detected via PIR patterns or power-consumption analysis) is mined for statistics, e.g., the frequency of event pairs occurring consecutively/temporally close; thresholds (pair seen close ≥ K times) then decide if two events belong to the same resident. The assumption may not always be realistic.
9
In knowledge-based subject separation, how is the semantic similarity of two sensor events computed?
AAveraging the ontology similarity of their locations and of their objects
BCounting how many times the two events co-occur in the training data
CMeasuring the inverse of the time elapsed between the two events
DComparing the cosine similarity of their learned embeddings
A — simS = (simC of the locations + simC of the associated objects) / 2, where concept similarity in the ontology uses the Least Common Subsumer: simC = 2N₃/(N₁+N₂+2N₃). C describes the temporal similarity component; B is the unsupervised statistics method; D would be data-driven, which this method deliberately avoids.
10
Why is "two residents performing the same activity" not sufficient to conclude a group activity?
ABecause group activities require at least three participating residents
BBecause multi-label models cannot output the same activity twice
CBecause they may perform it in different places, like watching TV in two rooms
DBecause group activities are not detectable with environmental sensors
C — the assumption holds only in some scenarios: two residents cooking are likely together (usually one kitchen), but two residents watching TV may be in different rooms. Context information in post-processing determines whether an activity is collaborative; recognizing collaborative activities is still an open challenge.
11
Simulation exam · Q24 — Multi-Inhabitant Human Activity Recognition
Open-ended
a) Define the data association problem. Why is it a challenge in Multi-Inhabitant settings? What is the difference compared to Subject Separation?
b) Describe one of the multi-label approaches for data-driven data association. In general, what are the limits of multi-label approaches for Multi-Inhabitant HAR?
Model answer

a) Data association is the problem of correctly associating each environmental sensor event (e.g., the stove turned on, the fridge opened) to the inhabitant that triggered it. It is a challenge in multi-inhabitant settings because environmental sensor events cannot identify who triggered them: with a single resident there is no ambiguity, but when two or more residents are at home (e.g., Alice relaxing at the dining table while Bob is cooking, with a chair pressure event and a fridge event firing) each event could belong to any of them. It is one of the most challenging problems limiting the deployment of real-world HAR systems in smart homes — also because annotating, for each sensor event, the resident who triggered it is usually prohibitive. Difference vs Subject Separation: subject separation is a weaker form of data association — it only determines which sensor events are likely triggered by different subjects, without associating them with the residents' identities. It is sufficient for applications where it only matters what activities are performed, not who performs them; after either process, single-resident HAR is applied to each resulting stream (with identity attached only in the data-association case).

b) One multi-label approach is the multi-output deep model: a single network (e.g., a hybrid CNN-LSTM) takes windows of sensor events as input and has one softmax output layer per resident, each predicting that resident's activity; the shared layers capture the spatio-temporal relationships between the activities performed (in parallel or jointly) by the different residents, so data association is performed implicitly. (Alternatives: Factorized HMM — one hidden chain per resident sharing the same observable sensor events; combined labels — one multiclass label per activity combination, up to NM labels in the worst case; binary relevance — one thresholded binary classifier per class, ignoring inter-resident dependencies.) General limits of multi-label approaches: they require a training set covering all possible combinations of activities performed by multiple residents, which is not practical; they cannot generalize to different homes with different residents and environments; and they have scalability problems — increasing the number of residents or activities significantly complicates training, with some methods (probabilistic graphical models) computationally prohibitive beyond 2 subjects.

12
Open-ended · Context-aware association & subject separation
a) Describe context-aware data association with wearables: pipeline, how events are associated, advantage, and challenges.
b) Describe the three approaches to subject separation (supervised, unsupervised, knowledge-based) with their assumptions and limits.
Model answer

a) Each resident wears a wearable/mobile device tracking their identity, their location (via the indoor positioning infrastructure), and additional context like posture, micro-localization and gestures. The pipeline: wearable + positioning data and environmental sensor data flow into a context aggregation module, then a context-aware data association module produces one sensor stream per resident. Association uses a rule-based model encoding common-sense relationships between sensor events and context (e.g., opening the fridge is necessarily done by a resident in the kitchen while standing) — typically encoded with ontologies. When an event fires, the system computes its context-consistency with each user's current context and associates the event with a user only if consistent (fridge opened → Bob, standing in the kitchen; chair pressure → Alice, sitting in the kitchen). Advantage: data association without requiring training. Challenges: assuming residents constantly wear devices is often impractical (especially for elderly subjects; mitigated by miniaturized devices such as smart clothes, smart rings, small BLE tags), and accuracy is bounded by the accuracy of the collected context (micro-localization precision, detectable postures/gestures).

b) Supervised (seq2seq): an encoder maps sequences of sensor events into a latent space and a decoder generates the separated per-subject sequences, delimited by special SOS/EOS tokens; limit — detailed annotation is still needed. Unsupervised: assumes an initial phase where unlabeled data is collected while a single resident is at home (detected via PIR patterns or power-consumption analysis; not always realistic); statistics are mined (e.g., frequency of event pairs triggered consecutively/temporally close within ε), and thresholds (pair observed close at least K times) decide whether two events belong to the same resident. Knowledge-based: uses semantic and temporal similarity between consecutive events against a threshold — simT = max(0, 1 − |τ(sej)−τ(sei)|/Tmax); simS averages the ontology-based concept similarity (via the Least Common Subsumer, simC = 2N₃/(N₁+N₂+2N₃)) of the events' locations and associated objects; similar events chain into the same parallel segment. General limits: separation stays hard when residents perform similar activities involving similar sensors in the same area (Alice setting the table while Bob cooks), and the methods may not scale well as residents increase.

0/10
MCQ score 0/10