nfer
a language and tool for inferring interval abstractions from event traces
This page describes research related to nfer. The nfer tool can be found at http://nfer.io/.
Nfer was developed in collaboration between researchers in Canada and from the NASA Jet Propulsion Laboratory in the USA (Kauffman et al., 2016). It was designed to help operators of the Mars Science Laboratory (Curiosity rover) and other spacecraft better understand these remote systems (Kauffman et al., 2016). Nfer creates abstractions of event streams, meaning the information produced by applying nfer rules is easier to comprehend than directly accessing the event stream. Nfer abstractions form a hierarchy of temporal intervals: they can be built up from smaller pieces to find meaningful information. Applying an nfer specification can also be understood as adding prior knowledge to a trace, transforming it into a more easily analyzed representation (Kauffman et al., 2018). Nfer specifications consisting of only before relations can also be mined from real-time system traces (Kauffman & Fischmeister, 2017).
Nfer is also a tool that implements the eponymous language(Kauffman, 2021). The tool takes an event stream as an input, such as a program log, and applies a specification to the stream to calculate new information in the form of intervals. In nfer, an interval refers to a piece of data with a label (also called an identifier or name) and two timestamps indicating when it began and ended. Intervals can also carry data, such as integers and strings, in a map. Events in the input are also considered intervals where the begin and end timestamps are identical. An nfer specification consists of rules that each relate (usually) two intervals to one another. When two intervals match, a new interval is produced using information from the rule to determine the label, timestamps, and data (Kauffman, 2023).
Recent work analyzing the evaluation complexity of nfer has shown that it is undecidable for the full language, but with numerous decidable fragments (Kauffman & Zimmermann, 2022). Notably, nfer evaluation under the minimality meta-constraint is in PTime (Kauffman & Zimmermann, 2024). Minimality restricts nfer to produce only intervals that are minimal in their timestamps; they do not contain another interval with the same identifier during the same time period. Nfer satisfiability is also undecidable in the general case, even without data, but a PTime algorithm exists for satisfiability without data and without cycles (Kauffman et al., 2024).
For humans to use nfer for event trace comprehension, the hierarchy of intervals it produces must be visualized. However, displaying the output of nfer comes with a unique set of challenges because of its hierarchical and concurrent nature. Visualizing these intervals has been the subject of some recent work that has found solutions to the problems inherent when data has duration and hierarchy (Sadman et al., 2025)