Code To Spot Anomalous Behavior

Written by: Earl Powell. Posted: November 01, 2013. 



Why anomalous behaviour is important?

This is a nontechnical discussion regarding the code that can spot anomalous behavior and the inferences that can be made. Why is this important to the subject of Aging In Place?  We are not necessarily interested in knowing that someone has to get up and go to the bathroom five times a night. However, the night that they don’t get up would be significant and we would want to respond with a notification and/or intervention of some kind.


We need code or more precisely source code.

DARPA (Defence Advanced Research Projects Agency) wants code to spot anomalous behavior on the job.  They want to monitor workers and possibly catch cyberspies. They want to figure out the likely intent of inferred action. This type of monitoring is nothing less than spying.  While technologically possible, this type of monitoring would be little help to those working on Aging In Place technologies.  In fact using this approach would most likely doom one’s efforts because Seniors don’t want to be monitored or spied upon. The DARPA approach requires that all behavior is monitored.


The significance of a disruption in a routine.

In Aging In Place technologies sensors will be used to detect anomalous behavior without a positive or negative valence.  Once this anomalous behaviors is observed by way of sensors it may be possible to infer that an event has happened that may need to be noted and/or require some kind of intervention.  This general idea is that everyone has a routine, sometimes referred as ADLs (Activities of Daily Living),  and that when this routine is disrupted one might infer that there is some risk associated with the disruption of the routine. I propose that Aging In Place technology would have source code that uses a three step approach.  The first step is to learn the routine, the second is to detect a disruption in the routine, and third is make an inference.  If you always take your medications in the morning with breakfast and always take your evening medications with dinner, a machine can learn your routine. If you don’t take your meds some morning it would detect a disruption of your routine.  We may be able to infer that you may have forgotten to take your meds.


Some may take exception to sensor technology.

Sensors measures physical quantities and there are almost an infinite number of sensors and combinations of sensors that can be used to measure things.  And yes, cameras and microphones are sensors.  In the Aging In Place community, we know that there is a significant subset of sensors that Seniors will not tolerate, and first and foremost among them are cameras and microphones.  Most sensors simply measure physical quantities resulting in data stream of numbers; they don’t need to take your picture or record your voice.


Invasive monitoring.

I would consider video and/or audio recording as an invasive monitoring.  I use this term because to video record and/or audio record a Senior would be the equivalent of a grave invasion of privacy.  Make no mistake about it, to do so would doom our attempts to bring Aging In Place technologies forward.


Can we differentiate “good” monitoring from “bad” monitoring?

While there is no general acceptance of the term non-invasive monitoring, I find it helpful in the discussion of the discipline that our industry will need to make these products and services useful and successful in the market. While I would like to say that we are not monitoring, we are.  We need a way to differentiate “good” monitoring from “bad” monitoring. This is particularly difficult because most Seniors don’t want to be monitored, the implication being that monitoring in general is bad.  This is why I am using the concept of invasive and non-invasive monitoring.  It’s useful for our present discussion but will ultimately be replaced by something else by the marketing professionals.


Measure physical quantities.

Using sensors and metrology we can measure physical quantities.  From these measurements we can derive logical conclusions, sometimes with a high level of confidence. We could measure the temperature in the room or your own weight with a high level of confidence. However human behavior is much too complex to simply draw conclusions.  We can only hope to infer something.


We can make an inference but how sure can we be?

We can make an inference of something being certainly true and having a probability of 1 and certainly false as having a probability of 0.  We could infer that there is a 0.7 probability that it might rain tomorrow so we might say that “it may rain tomorrow.  If we could infer a 0.9 probability we might say “the chance of rain tomorrow is extremely likely”.  In making inferences about the weather a 70% change may be given as “it may” and a 90% change may be articulated as “is extremely likely”.


We will have numbers but will need words.

In the Aging In Place technologies we would also be able to make an inference with a probability between 1 and 0.  However, we will articulate that inference with the use of words such as, may, could have, or likely.  You may have forgotten to take your pills,  you could have left the stove on, or it is likely that you have fallen.  


Is the going to be useful?

Can we infer with a high enough probability to be useful?  This is a difficult problem because inferences will need to be drawn from multiple sensors and measurements. The first issue is what can be inferred from a sensor and measurement. We can’t infer your weight by measuring your body temperature as being 98.6 degrees F.  There must be a significant correlation between the measurement and the inference being made.

Another problem in our ability to make inferences is that sensors need to be carefully calibrated.  Example, a motion sensor may need to be calibrated to eliminate the presence of a dog or cat.  This is where the science of metrology comes into play.  


How can we intervene?

Once we make an inference that something has or may have happened, can we intervene in some way to add value? Our technology can help by reminding a Senior and/or notifying a caregiver that the Senior may have, for example, forgotten to take their pills, to turn-off the cook stove or many other things.


Passive intervention.

These interventions could be passive, such as sending a text message to the Senior and/or to a caregiver.  “You may have forgotten to take your pills” or “Your father may have forgotten to take his medications.”  The intervention is passive because the responsibility for taking any action is left to other, namely the Senior and/or caregiver.


Active Interventions are also possible but need higher levels of probability.

 This is where home automation technologies can make their contribution.  Using sensors we could infer that the cook stove has been left on.  We might send a text message to the Senior and/or a caregiver stating that “The cook stove has been left on and the monitoring system is going to turn-off the gas valve to the stove”.  When an active intervention is anticipated the inference needs to have a higher level of probability, note the “has been” rather than “may have” in the message.


Next steps.

An open source database of sensor technologies and the possible inferences that could be drawn from their data needs to be developed. Specific source code or functions need to be developed for particular sensors or combinations of sensors.


How will we deal with the very real concerns people will have regarding privacy and security.  Seniors don’t want to be monitored.  I have tried to at least to convince myself that this issue is manageable by coining the idea of invasive and non-invasive monitoring and measuring rather than monitoring.  This attempt will fall short.  Getting this right will be even more important that the hardware and the source code.  



Sensors exists and source codes can be written that detect anomalous behavior and make inferences that an event may have occurred that needs an intervention of some kind.  This will be a complex undertaking that will require many disciplines, hardware, software engineering, metrology, marketing, and an understanding of the psychology of aging.     



Discuss, Comment, Ask Questions


Key words: 
Aging in place, active intervention, activities of daily living, ADLs, anomalous behavior, disruption, inference, intervention, invasive monitoring, non-invasive monitoring, passive intervention, PERS, probability

Last Updated: May 13, 2020.

Featured Research


Medical Alert Systems: Help

Medical Alert Systems GuideWe kept getting asked "which medical alert system is best?"; and "how do I choose the right medical alert system for me?". This independent, objective, hands-on research tries to answer those questions. If you are looking for a medical alert system, either for yourself or for an older adult such as a parent, this piece of research is for you.

Choose the Right Medical Alert System for YOU


Useful Apps Club

Useful Apps ClubUnlock the potential of your smartphone or tablet to improve your life. The Useful Apps Club is for older adults and Boomers who have a smartphone or tablet (or are thinking of getting one) and need help to turn it into a useful tool. We are focused on finding Apps that can change your life, and teaching you how to use them. 

View: The Useful Apps Club


Reduce Fall Risk

Avoid FallsRead the "best of the web" on: Avoiding Falling. Our team of clinicians and citizen analysts has scoured the web for the best available answers to a set of questions designed to help you make falling less likely, and make the consequences if you do fall less bad.

View: Avoid the Perils of Falling


Avoid Social Isolation & Loneliness

isolation and lonelinessOur community is exploring ways to avoid becoming isolated and lonely as we grow older. See what we are discovering — including one group of older adult's "recipe" for overcoming loneliness.

View: Isolation & Loneliness Hub


Medication Management Tools

medication management toolsPoor medication management is one of the key reasons people are forced to stop living independently. There are a wide range of tools that can help you manage your medications — and avoid, or at least postpone, that fate. We have researched which products work best for different types of people, ranging from simple inexpensive pill boxes and reminders to complex "automated" pill dispensers.

View: Medication Management Hub