Skip to main content
Back

CARE Forces Smart-Home Sensors to Agree, Hitting 89.8% Activity Recognition

A dual-view contrastive learning framework unifies sequence and image encodings of ambient sensor streams, setting new benchmarks for smart home activity recognition.

Pro

  • CARE aligns sequence and image encodings of ambient sensor streams via a supervised contrastive loss called SICA.
  • Hits 89.8% on Milan, 88.9% on Cairo, and 73.3% on Kyoto7 CASAS datasets, beating prior baselines.
  • Uses hourly time-binning plus frequency-based event filtering to suppress noise before encoding.
  • Dual-view images combine a temporal matrix with a floor-plan-based spatial graph of sensor transitions.
  • Accuracy drops only 1-3% under simulated sensor malfunctions and repositioning, outperforming DeepCASAS and TDOST.
  • Code released at github.com/Jhziiiig/CARE; paper at arxiv.org/abs/2510.16988.

Recognizing what someone is doing at home from a handful of motion detectors, door contacts, and temperature probes sounds simple until you look at the raw data. The signal is sparse, irregular, and easily corrupted by a sensor that fires when nobody is around. A new framework called CARE tackles this by treating each activity as two complementary views of the same event stream and forcing them to agree in a shared latent space.

The paper reports state-of-the-art numbers on three standard CASAS smart-home datasets and, more interestingly, shows the model degrades gracefully when sensors break or get moved around. Code is available on GitHub.

Why ambient activity recognition keeps breaking

Ambient Assisted Living systems are attractive because they monitor older adults without cameras or wearables. But ambient sensors generate event-triggered time series that are sparse, irregular, and noisy: motion sensors activate only when residents pass by, door sensors only when opened or closed. On top of that, the same activity gets performed differently every time.

Prior work has split into two camps, each with a blind spot:

  • Sequence-based models (LSTMs, TCNs, FCNs) preserve event order but often ignore the absolute daily time context (e.g., morning vs. evening), are highly sensitive to noise, and lack explicit mechanisms for capturing spatial relationships among sensors.
  • Image-based models turn event streams into 2D activity images and run CNNs over them, but they suffer from distorted layouts introduced by artificial 1D indexing, reduced temporal resolution that obscures fine-grained dynamics, and the neglect of sensor activation frequency as a potentially discriminative feature.

Concatenating features from both worlds is the obvious hack, but it lets the classifier lean on whichever stream is dominant and never really forces the two views to reconcile.

Two views, one latent space

CARE keeps both encoders but adds a contrastive objective called Sequence-Image Contrastive Alignment (SICA) that pulls together embeddings of the same activity across views and pushes apart embeddings of different activities. Contrastive learning here means bringing semantically similar samples closer and pushing dissimilar ones apart in the embedding space, but with supervision: labels are used to construct positive pairs both within a view and across views.

CARE framework architecture with sequence and image branches feeding into contrastive alignment and classification

The pipeline has three notable design choices:

  1. Time-aware sequence encoding. Instead of just event order, each event gets a coarse time-of-day bin (one hour works best across all datasets). A frequency filter drops sensors that fire only sporadically inside a segment, shortening sequences and removing spurious activations.
  2. Dual-perspective image encoding. Rather than one grayscale matrix, CARE builds a temporal image (event order vs. sensor ID, colored by modality) concatenated with a spatial image that plots sensors at their real floor-plan coordinates, with node darkness proportional to activation frequency and edges weighted by transition counts.
  3. Joint contrastive plus cross-entropy loss. A single training stage optimizes L = β * L_SICA + (1-β) * L_CE, avoiding the two-stage "pretrain then classify" pipeline that complicates deployment.
Frequency-based event filtering showing sequence length reduction at different threshold levels

The numbers

Evaluated on the CASAS Milan, Cairo, and Kyoto7 testbeds, CARE achieves state-of-the-art performance (89.8% on Milan, 88.9% on Cairo, and 73.3% on Kyoto7). The gains over the previous best method (TDOST, which frames activity recognition as a language-modeling problem) are around 1-3 points, and larger over vanilla LSTM or ResNet baselines.

The ablations are more revealing than the leaderboard:

  • Cross-view alignment beats within-view alignment and instance-level self-supervised alignment across all three datasets.
  • Replacing SICA with naive concatenation plus cross-entropy costs about 1.3 F1 points on the noisier Kyoto7, confirming the contrastive signal actually does work rather than being cosmetic.
  • Under simulated sensor malfunctions (5% of samples, 5-10% of events replaced with defaults) and sensor repositioning with Gaussian noise, accuracy on Milan, Cairo and Kyoto7 drops by only 1-3% across all corruption settings, while a DeepCASAS baseline drops further.

When it helps and when it doesn't

CARE is a good fit if you are building a smart-home monitoring pipeline on CASAS-style pre-segmented event streams and can afford roughly 1.6 GB of memory for the dual encoders. Inference stays around 10 milliseconds per batch, which is roughly on par with image-based baselines and far cheaper than the graph-based alternatives that need repeated graph construction.

The authors are upfront about limitations. It assumes activities are already segmented, so a lightweight segmentation front-end is needed for continuous streams. It struggles with multi-inhabitant homes where activities overlap. The spatial image relies on fixed sensor coordinates, so reconfigurable environments require adaptation. And SICA needs labels to build class-level positive pairs, which is a problem when labels are scarce in privacy-sensitive homes.

Still, the broader lesson is worth taking away: for sparse, irregular sensor data, forcing heterogeneous views into a shared latent space with a supervised contrastive loss is a cleaner recipe than dumping features into a classifier and hoping it figures out which stream to trust.