# Patent

## Title
System and method of anomaly detection with categorical attributes

## Abstract

A method and apparatus where the method includes detecting a plurality of events related to the activities of users within a security system wherein the events are defined by a plurality of attributes, wherein at least one attribute is categorical and wherein a data distance between events is a function of event attributes, evaluating the detected events using a density based anomaly detection method f(r), where r is a size of a neighborhood around a data point, comparing a value of the evaluated expression with a margin threshold value (msg(r)) and setting an alarm upon detecting that the value exceeds the threshold value.

## Background
FIELD
The field of the invention relates to physical security systems and more particularly to methods of detecting anomalous behavior by users of the security system.
BACKGROUND
Security systems are generally known. Such system typically include a number of sensors that detect security threats associated a secured area. The security threats may include those posed by intruders or by environmental threats such as fire, smoke or natural gas.
Included around the secured area may be a physical barrier (e.g., wall, fence, etc.) that prevents intruders from entering the secured area. A number of portals (e.g., doors, windows, etc.) may be provided around the periphery of the secured area to allow entry into or egress from the secured area.
The doors allowing entrance into the secured area, in turn, may be controlled by a card reader and electric lock that together restrict access through the portal to authorized persons. Each time a card is swiped through the card reader, the reader reads a user identifier from the card and allows access if the identity on the card matches a reference identifier.
While such systems work well, the identification cards used in such systems can be lost or stolen. Accordingly, a need exists for methods of detecting the unauthorized use of such cards.



BRIEF DESCRIPTION OF THE DRAWING
FIG. 1 is a block diagram of a security system shown generally in accordance with an illustrated embodiment.



DETAILED DESCRIPTION OF AN ILLUSTRATED EMBODIMENT
While embodiments can take many different forms, specific embodiments thereof are shown in the drawings and will be described herein in detail with the understanding that the present disclosure is to be considered as an exemplification of the principles hereof, as well as the best mode of practicing same. No limitation to the specific embodiment illustrated is intended.
FIG. 1 is a block diagram of a security system shown generally in accordance with an illustrated embodiment. Included within the security system may be a number of sensors 12, 14 used to detect security threats within one or more secured areas 16 of the security system. In this regard, the secured area may be divided into a number of different security zones 38 with different levels of security.
Under one illustrated embodiment, the sensors may include one or more limit switches mounted to portals (e.g., doors, windows, etc.) that provide entrance into or egress from the secured area. In this way, the sensors may be used to detect intruders entering the secured area.
The sensors may also include one or more environmental detectors (e.g., fire, smoke, natural gas, etc.). The environmental detectors may be used to activate an audible/visual alarm as an indication that the secured area should be evacuated.
Also included within the system may be one or more processor apparatus (processors) 22, 24 located within a control panel 40 of the security system. The processors may operate under control of one or more computer programs 26, 28 loaded from a non-transitory computer readable medium (memory) 30. As used herein, reference to a step performed by a program (or the system) is also a reference to the processor that executed that step of the program.
During normal operation, an alarm processor may monitor a status of each of the sensors for security threats. Upon detecting a threat, the alarm processor may compose an alarm message and send that message to a central monitoring station 32. The central monitoring station may respond by alerting the proper authorities (e.g., police department, fire department, etc.).
In addition to detecting activation of one or more of the sensors, a monitoring processor may also save a record of the event into an event file 42, 44. The record may include an identifier of the sensor activated, a location of the activated sensor and a time of activation.
Also included within or along a periphery of the secured area or zones may be one or more cameras 18, 20. The cameras may operate to collect sequences of video frames and save the images of those frames into memory.
The cameras may operate continuously or only upon the detection of motion within a portion of the secured area. In the regard, motion may be detected via a sensor (e.g., a passive infrared (PIR) sensor) or by operation of a video processor that compares pixel values of successive frames to detect changes consistent with movement of a human within a field of view of the camera.
In some cases, such as motion in a high security are of one of the secured zones, the detection of motion may be regarded as a security threat and an alarm may be raised in accordance with a level of the threat. In other cases, the detection of motion may simply cause the security system to record a sequence of video frames for later evaluation and action. In either case, a record of the event may be saved in an event file. The record may contain an identifier of the camera, the location of the camera and a time of activation.
Located along a periphery of each of the secured area and/or zones may be one or more portals (e.g., doors) 34 that provides entry into and egress from one or more of the secured areas or zones to authorized users. The doors may be provided with an appropriate lock that denies physical entry of unauthorized persons (i.e., intruders) into the secured area.
Associated with the entry doors may be an access control system 36. The access control system may include a recognition device (e.g., card reader, keypad, etc.) coupled to an electric lock. In order to gain entry to the secured area, an authorized person may enter a personal identification number or swipe a card through a card reader in order to activate the electric lock and gain entry to or egress from the secured area.
Each of the access control systems may be monitored and controlled by an access processor within the control panel. In this regard, the access processor may receive identifiers of persons seeking access to one of the secured areas or zones and compare those identifiers with a list of authorized persons for each corresponding secured area or zone. Upon determining that the person seeking access is authorized, the access processor may send a signal opening the electric lock and granting access to that person into the secured area.
Upon granting access, the access processor may create and save a record of that access into an event file. The information saved within the event file may include an identifier of the person and of the secured area and a time of access.
Also included within the system may be one or more processors that detect trouble with the security system or potential security threats. Potential security threats may include loss of video from a camera or activation of one of the sensors that would not otherwise raise an alarm or activation of an alarm sensor while the system is in a disarmed state. In each case, upon detecting an indication of trouble, the trouble processor may save a record of the event into an event file. The record may include an identifier of the type of trouble, the sensor, camera of other device involved and a time of the event.
In general, the event files of a security system can be an important source of information that can be used to address and identify security vulnerabilities and developing threats. For example, the loss of video from a particular camera may be a simple case of equipment failure or it could be the result of someone intentionally disabling a camera for a short period of time in order to obscure some criminal act.
Similarly, in the case of an organization that secures an area to carry out some enterprise, the saved events caused by the activities of the employees of the organization may be used as an important source of information in detecting disloyal employees or patterns of activity. For example, an employee assigned to some function within a first zone of the secured area may suddenly begin accessing other zones without any apparent reason for doing so. This may indicate that the employee is engaging in some illegal activity or is simply looking for a way to defeat one or more sensors of the security system.
Similarly, a criminal may steal or otherwise come into possession of an access card from an authorized user and attempt to use the access card to gain entry to the secured area during an off-shift or a period when the secured area is, otherwise, vacant. The use of the access card during a time period when an authorized user would not normally use his/her card could be an indication of a security threat.
Under one illustrated embodiment, one or more event detection processors may detect events saved into the event files as they occur in real time. Similarly, one or more threat evaluation processors may identify similar past or contemporaneous events and assess threats based upon deviations between the current event and past events. The identification of similar events may be based upon a particular employee, upon a particular sensor, upon a time period, upon a location of an event or upon any of a number of other different unifying factors.
Under the illustrated embodiment, a grouping processor may process the data within the event files to consolidate the events pi into a set of objects P (where P={p1, . . . , pi, . . . , pN) under any of a number of the different unifying factors. Unifying factors may be based upon an identifier of the switch or card reader that triggers the event, the time of the event, an identifier of the person that causes the event or any of a number of other factors that indicate a common source. Once consolidated based upon the unifying factors, the events may be processed to identify any currently detected events that appear as outliers and that indicate the statistical possibility of a security threat. Upon detecting such an event, an alert or alarm may be set by the alarm processor.
Processing of the grouped data may be accomplished under any of a number of different density based anomaly detection methods. One method is described in the publication entitled “LOCI: Fast Outlier Detection Using the Local Correlation Integral” by Papadimitriou et al., School of Computer Science, Carnegie Mellon University, November 2002 or the publication entitled “LOF: Identifying Density-Based Local Outliers” by Breunig et al., ACM SIGMOD 2000 Int. Conf. ON management of Data, Dalles Tx, 2000. Other similar methods may also be used.
For purposes of simplicity, the processing of the grouped data will be described by analogy to the LOCI method. However, it should be understood that the processing of the grouped data may also be accomplished using the similar processes of any of a number of other density based anomaly detection methods.
Under the LOCI method, the grouped data may be processed by a LOCI processor. For example, consider the situation where a particular sensor is activated. In this case, past events involving the same sensor may be evaluated by grouping such events on an x-y basis by considering interval between activations of the sensor on the x-axis and the number of activations of the sensor on the y-axis (or vice versa). The processor may perform a range-search for all objects that are closer than some maximum radius value rmax from a center object pi. The objects may then be sorted to form an ordered list Di based upon their distance to the center object pi. A value n of the number of r-neighbors of pi is determined (i.e., n(pi,r)≡|N(pi,r)|, where N(pi,r)≡{pεP|d(p,pi)≦r}. An average of n (i.e., {circumflex over (n)}) over the set of r-neighbors is determined




  
    (
    
      
        i
        .
        e
        .
      
      ,
      
        
          
            n
            ^
          
          ⁡
          
            (
            
              
                p
                i
              
              ,
              r
              ,
              α
            
            )
          
        
        ≡
        
          
            
              ∑
              
                p
                ∈
                
                  N
                  ⁡
                  
                    (
                    
                      
                        p
                        i
                      
                      ,
                      r
                    
                    )
                  
                
              
            
            ⁢
            
              N
              ⁡
              
                (
                
                  p
                  ,
                  
                    α
                    ⁢
                    
                      
                    
                    ⁢
                    r
                  
                
                )
              
            
          
          
            n
            ⁡
            
              (
              
                
                  p
                  i
                
                ,
                r
              
              )
            
          
        
      
    
    )
  
  .




A standard deviation of n(p,αr) (i.e., σ{circumflex over (n)}(pi,r,α)) may be determined over a set of pi





  
    (
    
      
        i
        .
        e
        .
      
      ,
      
        
          
            σ
            
              n
              ^
            
          
          ⁡
          
            (
            
              
                p
                i
              
              ,
              r
              ,
              α
            
            )
          
        
        ≡
        
          
            
              
                ∑
                
                  p
                  ∈
                  
                    N
                    ⁡
                    
                      (
                      
                        
                          p
                          i
                        
                        ,
                        r
                      
                      )
                    
                  
                
              
              ⁢
              
                
                  (
                  
                    
                      n
                      ⁡
                      
                        (
                        
                          p
                          ,
                          
                            α
                            ⁢
                            
                              
                            
                            ⁢
                            r
                          
                        
                        )
                      
                    
                    -
                    
                      
                        n
                        ^
                      
                      ⁡
                      
                        (
                        
                          
                            p
                            i
                          
                          ,
                          r
                          ,
                          α
                        
                        )
                      
                    
                  
                  )
                
                2
              
            
            
              n
              ⁡
              
                (
                
                  
                    p
                    i
                  
                  ,
                  r
                
                )
              
            
          
        
      
    
    )
  
  .




In order to detect outliers, a multi-granularity deviation factor (i.e., MDEF(pi,r,∝) may be defined for point pi at radius (or scale)r. Similarly, a normalized deviation (i.e., σMDEF(pi,r,α) that is directly comparable to MDEF may be defined. Outliers may be determined by a comparison processor that evaluates the expression MDEF(pir,α)>kσσMDEF(pi,r,α), where k has a value of 3.
The steps performed by the LOCI processor can be summarized by the pseudo-code as follows.















//Pre-processing



For each pi ε P:



   Perform a range-search for Ni = {p ε P|d(pi,p) ≦



   rmax}



   From Ni, construct a sorted list Di of the critical



   and α-



      critical distances of pi



//Post-processing



For each pi ε P,



   For each radii r ε Di (ascending):



      Update n(pi,αr) and {circumflex over (n)}(pi,r,α)



      From n and {circumflex over (n)}, compute



         MDEF(pi,r,∝) and σ{circumflex over (n)}(pir,α)



      If MDEF(pi,r,α) > 3σMDEF(pi,r,α), then



      flag pi



         as an outlier and set an alarm.










In order to identifier outliers using MDEF(pi,r,α), the above methods need a well-defined local neighborhood upon which the data point population is counted. Local neighborhoods are easily defined for data spaces where the dimensions are continuous attributes because, by definition, a metric, such as an Euclidean metric, may be easily defined for the space composed of continuous variables. The problem arises for categorical attributes that define a category, where there are no generic metrics than can be used. Therefore, for data spaces where one or more categorical attributes represent one or more data spaces dimensions, the local neighborhood cannot be defined.
The need for algorithms that combine continuous and categorical attributes to define its dimensions arises, for instance, in the detection of anomalous events in the context of access control systems for buildings or facilities. An example of the situation in which one may want to perform anomaly detection is in the context where the access data contains time of access, stay duration after the access and a user identifier (ID) that define the dimensions of the three dimensional data space. In this example, the time of access and stay duration are continuous attributes with clear notion of distance and neighborhood between the data points and wherein the user ID represents a categorical attribute, where the distance between two data points cannot be defined and therefore a local neighborhood cannot be established.
The system described herein solves the problem of detecting anomalies associated with categorical data by establishing a distance between the data values in the categorical portion of the data space. Once a distance value is established, then the local neighborhood may be defined for that data space or for any multidimensional data space that combines the categorical and continuous attributes as its dimensions.
One way of how to define a distance between the categorical data values may be based upon the context of the category of the data or an external knowledge which may be available depending on the meaning of the categorical data and/or depending on the application in which the categorical data are used. For the particular example of user IDs allowing access to a secured area of a security system, the users may be grouped based upon the functions that they perform in the building/facility controlled by the access control system (e.g., maintenance, management, security, laboratory employees, laboratory administrative personnel, etc.) or based on the security zones where the user has access rights.
In another example, the categorical data may be access point identifiers (IDs) of the access controller that controls the card reader and electric lock at that location. In this example, the access point IDs may be grouped based upon their known locations within the building or facility, based upon their assignment to a particular security zone within the facility or based upon the function type of the secured zone where the access control device is located.
Once the categorical data values have been assigned to predefined groups, the distances between the groups may be defined and the defined distance assigned to each related couple of the categorical values according to differences in the group assignment of these two values. For instance, the distance between the access point IDs belonging to the same security zone may be defined as 0 (zero). A distance of the access point IDs from the security zones that are used in areas adjacent to each other may be defined as 1. A distance of the access point IDs from the security zones that are not adjacent but reside on the same floor of the same building may be defined as 2. A distance of the access point IDs from the security zones that reside on different floors may be defined as 3. A distance of the access point IDs from the security ones that reside in differing buildings may be defined as 4.
Another example of grouping and assigning distances may be based upon the function type of the secured area associated with the access point. In this example, the distance between two access points, each associated with the spaces of an identical function may be defined to be separated by a distance of 0. The distance between two access points, each associated with the space of a similar function type may be a defined distance of 1. The distance between two access points, each associated with spaces of a different function type, may have a defined distance of 2.
Another way of defining the distance between categorical data values may be based upon statistics of the data associated with each categorical value. If there is a sufficient amount of data available for each categorical value, a similarity measure may be defined for the categorical values by comparing the statistics of the data associated with each categorical value. The similarity measure may be based upon the stability of the statistics or any other factor. This would be particularly useful for anomaly detection in multidimensional data spaces where one dimension of the data space is constituted by the categorical attribute and other dimensions are continuous attributes. In these cases the user may construct continuous attribute distributions for each categorical value based upon the statistics. Statistical similarity measures, such as Kullback-Leibler divergence or mutual information may also be used to provide a distance value between two distributions. Once a similarity between each two categorical values is defined, the similarity may be inverted into a distance measure and used to establish the notion of a neighborhood around any categorical value.
In general, density based anomaly detection methods may be used in many different aspects of security systems to increase security level of a secured area of the facility. In this regard, anomalous events may indicate an irregular activity or behavior and, therefore, may lead to an early discovery of serious security threats. In one example, the system may look for anomalous behavior in events reported by access control devices of a secured area. In other examples, the system may search for anomalous events in the database of security events of an integrated security system that consists of intrusion detection, access control systems, video analytics and other security related subsystems.
In other examples, the system may review events from a system diagnostic apparatus. In this case, the system may analyze and detect defects in particular devices, system failure or evidence of people attempting to exploit system weaknesses.
In general, the system includes apparatus implementing a method of detecting anomalies. The method includes the steps of detecting a plurality of events related to the activities of users within a security system wherein the events are defined by a plurality of attributes, wherein at least one attribute is categorical and wherein a data distance between events is a function of event attributes, evaluating the detected events using a Local Correlation Integral (LOCI) f(r), where r is a size of a neighborhood around a data point, comparing a value of the evaluated expression with a margin threshold value (msg(r)) and setting an alarm upon detecting that the value exceeds the threshold value.
From the foregoing, it will be observed that numerous variations and modifications may be effected without departing from the spirit and scope hereof. It is to be understood that no limitation with respect to the specific apparatus illustrated herein is intended or should be inferred. It is, of course, intended to cover by the appended claims all such modifications as fall within the scope of the claims.

## Claims

1. A method comprising:
detecting a plurality of events related to the activities of users within a security system wherein the events are defined by a plurality of attributes, wherein at least one attribute is categorical and wherein a data distance between events is a function of event attributes;
evaluating the detected events using a density based anomaly detection method, f(r), where r is a size of a neighborhood around a data point representing the event;
comparing a value of the evaluated expression with a margin threshold value (msg(r)); and
setting an alarm upon detecting that the value exceeds the threshold value.

2. The method as in claim 1 wherein the function of the event attributes further comprises associating an event's access point identifier (ID) to a predetermined one of a plurality of security zones within the secured area wherein the distance between events is determined based on spatial arrangement of the security zones and wherein said distance is used to establish notion of neighborhood around a data point representing the event.

3. The method as in claim 1 wherein the function of the event attributes further comprises associating the event's user ID to a predetermined one of a plurality of user roles within the secured area, wherein the distance between events is determined based on similarity of the associated user roles and wherein said distance is used to establish notion of a neighborhood around a data point representing the event.

4. The method as in claim 1 wherein the function of the event attributes further comprises associating the event's user ID to a predetermined one of a plurality of security zones within the secured area, wherein the distance between events is determined based on differences between the associated security zones and wherein said distance is used to establish notion of a neighborhood around a data point representing the event.

5. The method as in claim 1 wherein the function further comprises continuous data values including at least one of a time of entry into the secured area, a frequency of entry into the secured area per time period, a duration of stay within the secured area after each entry, a frequency of travel from one security zone to another within the secured area and a duration of non-entry into the secured area.

6. The method as in claim 5 further comprising constructing a continuous attribute distribution for each continuous data value function associated with each categorical value of a user.

7. The method as in claim 6 further comprising defining a similarity measure using similarity measures including at least Kullback-Leibler divergence or mutual information defined for two distributions.

8. The method as in claim 7 further comprising inverting the similarity into a distance measurement and using it to establish notion of a neighborhood around a data point representing the event.

9. An apparatus comprising:
an event processor that detects a plurality of events related to the activities of users within a security system wherein the events are defined by a plurality of attributes, wherein at least one attribute is categorical and wherein a data distance between events is a function of event attributes;
an evaluation processor that evaluates the detected events using a density based anomaly detection method, f(r), where r is a size of a neighborhood around a data point representing the event;
a comparison processor that compares a value of the evaluated expression with a margin threshold value (msg(r)); and
an alarm processor that sets an alarm upon detecting that the value exceeds the threshold value.

10. The apparatus as in claim 9 wherein the event processor and function of the event attributes further comprises a processor that associates an event's access point identifier (ID) to a predetermined one of a plurality of security zones within the secured area wherein the distance between events is determined based on spatial arrangement of the security zones and wherein said distance is used to establish notion of neighborhood around a data point representing the event.

11. The apparatus as in claim 9 wherein the event processor and function of the event attributes further comprises a processor that associates the event's user ID to a predetermined one of a plurality of user roles within the secured area, wherein the distance between events is determined based on similarity of the associated user roles and wherein said distance is used to establish notion of a neighborhood around a data point representing the event.

12. The method as in claim 9 wherein the event processor and function of the event attributes further comprises a processor that associates the event's user ID to a predetermined one of a plurality of security zones within the secured area, wherein the distance between events is determined based on differences between the associated security zones and wherein said distance is used to establish notion of a neighborhood around a data point representing the event.

13. The apparatus as in claim 9 wherein the function further comprises continuous data values including at least one of a time of entry into the secured area, a frequency of entry into the secured area per time period, a duration of stay within the secured area after each entry, a frequency of travel from one security zone to another within the secured area and a duration of non-entry into the secured area.

14. The apparatus as in claim 13 further comprising constructing a continuous attribute distribution for each continuous data value function associated with each categorical value of a user.

15. The apparatus as in claim 14 further comprising defining a similarity measure using similarity measures including at least Kullback-Leibler divergence or mutual information defined for two distributions.

16. The apparatus as in claim 15 further comprising inverting the similarity into a distance measurement and using it to establish notion of a neighborhood around a data point representing the event.

17. An apparatus comprising:
a security system that detects security events within a secured area;
a processor that detects events related to the activities of users within a security system wherein the events are defined by a plurality of attributes, wherein at least one attribute is categorical and wherein a data distance between events is a function of event attributes;
a processor that evaluates the detected events using a density based anomaly detection method, f(r), where r is a size of a neighborhood around a data point representing the event;
a processor that compares a value of the evaluated expression with a margin threshold value (msg(r)); and
a processor that sets an alarm upon detecting that the value exceeds the threshold value.

18. The apparatus as in claim 17 wherein the function further comprises continuous data values including at least one of a time of entry into the secured area, a frequency of entry into the secured area per time period, a duration of stay within the secured area after each entry, a frequency of travel from one security zone to another within the secured area and a duration of non-entry into the secured area.

19. The apparatus as in claim 17 wherein the function further comprises continuous data values including at least one of a time of entry into the secured area, a frequency of entry into the secured area per time period, a duration of stay within the secured area after each entry, a frequency of travel from one security zone to another within the secured area and a duration of non-entry into the secured area.

20. The apparatus as in claim 17 wherein the event processor and function of the event attributes further comprises a processor that associates the event's user ID to a predetermined one of a plurality of user roles within the secured area, wherein the distance between events is determined based on similarity of the associated user roles and wherein said distance is used to establish notion of a neighborhood around a data point representing the event.