
There are well over a hundred distinct criteria to apply to even a standard staging analysis, all of which will be placed under some form of direct or indirect user control. A primary goal in pursuing this project is to make the software adaptive to non-standard research needs. Ideally, when the analyst changes a decision made by the program, it should be able to apply the criteria necessary to accomplish that change to all new data subjected to the changed analysis configuration, which may be saved to a named script file for certain classes of studies or to suit the needs of an individual analyst. An example might be the inclusion of data representing time-varying body temperature. The program will "interview" the analyst to determine criteria for assessing the data (voltage thresholds, frequency bands of interest, discrete waveform "events"), or the analyst might re-arrange existing criteria in a graphical decision tree. This can also be accomplished (but much more awkwardly) by allowing the analyst to modify individual decision parameters in Windows numeric "dialogs":. New plug-in software development tools to accomplish these tasks are just now coming onto the market and will form a significant part of a Phase II project. CoDebris has established a cooperative agreement with one of these commercial tool developers, Visual Solutions, Inc.
It is considered crucial to a successful implementation that all scoring decisions be made adaptable to the user's analysis goals and that the software "learns" to use these goals in future analyses of the same type. Thus several levels of intervention in the scoring process are to be included. One example is the "tuning" for false-positive and false-negative rejection of identified waveforms. The analyst can introduce, as "templates", waveforms "clipped" from an EEG data set, to be used as mathematical models for extraction. Another example is to allow the analyst to alter a final stage decision, then "interview" him to learn the criteria to achieve that altered decision.
A measure of effectiveness of this procedure is, then, to re-submit the same raw data to the stage decision process and assess that it did or did not reach the desired conclusion.
So-called "multi-channel events" like EOG REMs and combined EEG/EMG arousals will also be made extractable, as for at least a given subject these events seem to have visually characteristic features. These compound events require isolation of the waveforms characterizing the event in each channel, together with determination of the time "window" within which the waveforms occur. All such extracted waveforms can be reviewed by the analyst and their inclusion over-ruled if necessary.
Configuration files can be created for each analyst's own professional criteria, for varied subject populations, and for various sleep disorders. The numerical criteria determining every measured quantity will be alterable by the analyst, but the analyst will not necessarily have to deal directly with the numbers.
It would be very inappropriate to place a series of slider bars or numeric dialogs totaling over a hundred items in front of a typical user. Although this level of configuration detail must be provided, it should be placed well behind some top-level configuration screens displayed whenever the analyst wants to change an epoch score, revise a stage decision criterion, or enter a new criterion and perhaps a new data type. This may occur in response to selecting "Configuration" from a "Settings" menu. When the analyst wants to change any particular epoch score, the program assumes a conversational tone:
"You have elected to change the epoch score from Stage 1 to Stage Waking. ARK will present you with the existing stage decision criteria and show you how to change them, but be aware that changing any stage decision criteria may change other epoch scores in addition to the one in question."
and asks to continue or cancel the Configuration session.
ARK will attempt to alter the decision criteria so that only the epoch in question is affected. Whenever it cannot do this (if other epoch scores would be significantly affected also) ARK will display dialogs which guide the analyst in making rational changes to the decision criteria. Subsequent runs over the same data would then interpret the data using the new criteria, producing the desired stage results.
Note that the analyst always retains the option to change any criteria in any manner, within system constraints (e.g. a voltage threshold cannot exceed the maximum voltage in the data set, a frequency band cannot include the 60Hz line frequency, a lower limit cannot exceed an upper limit, etc.)
Criteria are exposed at the individual level in the lowest, detail-level, dialogs. But before these are encountered, higher-level dialogs allow the analyst to increase or decrease the occurrence of (say) Stage 3 and 4 scores in general. For stages 3 and 4, the criteria are straightforward: change the threshold for High Amplitude Slow Waves. There are three ways to do this. Either the voltage threshold for slow wave sleep (nominally 75 microvolts), the upper and lower HASW band limits, or the fraction of an epoch duration occupied by slow wave sleep (nominal 20-50% for Stage 3 and > 50% for Stage 4) can be changed. If simply asked to decrease the occurrence of slow wave sleep scores, ARK will increase the epoch duration fraction. This increases the amount of Stage 2 sleep, but does not alter higher stage scores.
The analyst is asked which of these criteria to alter. By grouping the decision criteria in this way ARK avoids overloading the analyst with extraneous detail.
If a reduction in the Delta wave upper band limit is selected, the analyst is advised that the Theta band just above Delta may be automatically altered to retain a continuous spectrum for all bands. This may be over-ridden in the detail-level dialogs by the analyst. Similarly, if the Delta wave lower band limit is decreased the analyst is cautioned that spectral measurements too near the origin (zero frequency, or DC) are increasingly inaccurate as DC is approached.
This careful, proactive intervention in the configuration process gives the analyst complete control over the configuration but assures that the analyst is made explicitly aware of the consequences. State diagram representations of the existing 100+ decision elements involve a mixture of both "fuzzy" (continuous, adjectival) and "crisp" (binary branching) logic.
As is done in Rechtschaffen and Kales, the configuration interface includes sample montage screens for each stage, where the analyst moves voltage or time threshold bars, and a sample overall spectrum with the EEG bands delineated. The analyst can specify frequency band limits, which are allowed to overlap or contain gaps, and can also define unique bands with names which may have meaning only for certain configurations. Use of the band information may be inclusive or exclusive: a frequency or level threshold may be tagged to signify an event's occurrence or conclusion if the threshold is crossed from either direction.
The analyst can define and name a new class of event, and can choose to associate it with the occurrence ("simultaneous" within a specified time window) of discrete "waveform" events from any other channels, much as K complexes and spindles are used individually in Stage 2. The user can, by doing nothing, choose a default configuration for straightforward R&K (healthy adult). If the user looks into the configuration system, additional canned configurations are made available for assessing certain disorders. The user may also specify that any specified configuration be invoked automatically each time the program is run.
If a configuration is determined by ARK to hold obviously erroneous settings, the user is notified and queried to reject the apparently erroneous configuration, or to run it anyway. A configuration may be obviously faulty (null decisions, missing data elements, failure on past analyses to detect required "benchmark" events) and still be valuable to the analyst, who will be queried whether ARK should "clean up" the suspect configuration. Unsophisticated users never have to enter a configuration dialog except perhaps to locate missing data files, replace corrupt data files, or respond to a small set of other obviously fatal errors.
The user interface for adapting analysis criteria to individual requirements relies partly on some software tools and techniques that were once the province of computer science laboratories, but which have recently been refined and incorporated in readily-available and inexpensive toolkits such as IBM's Open Class Library available with the VisualAge compiler series, and in other commercial libraries. Home-brew versions of such graphical tools are notoriously difficult to implement cleanly.
For instance, one graphical "metaphor" will be a representative montage, or multi-channel time display of several related quantities (e.g. 30 seconds of EEG, EKG, EOG, EMG) which will have movable level threshold bars for each trace. The user associates thresholds with different criteria (e.g. high amplitude slow wave, low-voltage mixed frequency) by naming them. Similarly, a spectrum display will contain vertical bars over the graph representing various named bands which may be slid horizontally by the user, and horizontal bars in each band representing level thresholds which may be adjusted vertically.
These symbols are "loaded" with several characteristics that accompany them as they are manipulated (moved, generated, deleted, labeled) by the user. In object-oriented terms, the symbols support "adding new classes of behavior, defining inheritance relationships, and adding attributes to classes". This implies the ability to make such behaviors context-dependent, such as "only after Stage 1", "not attainable from Stage REM", or "during first half of session". Such behaviors can be codified by a linguistic parser, but more commonly require a dialog of the usual sort: slider bars, list boxes, etc. The dialog approach is easily implemented but is not very flexible, and may inadvertently leave unsuitable options in the configuration unless the user is careful to look at and successfully interpret every one affecting the analysis. At a minimum, before an analysis is run with a tailored configuration the user will be presented with a comprehensive review of the configuration and can modify any item by highlighting it.
The user is guided in the process of selecting new discrete waveform templates by watching a simulated mouse cursor "dragging" across a section of a time series graph containing a sample of the desired waveform. An accompanying dialog discusses the process and how to apply it to the user's analysis procedures. After a configuration session, summary dialogs are displayed for the user to confirm or change any named criteria. Although virtually any criteria may be assigned to an analysis configuration in these graphical procedures, the user may optionally elect to simply enter numeric data and criterion names in traditional grouped, alphanumeric entry boxes (under Microsoft Windows, so-called "edit controls").
Transitions between sleep stages are the province of "decision trees", which diagrammatically provide movable, connectable, user-generated flexible links depending on stage values from preceding (or following) epochs. The sleep stage values are "states" and the links contain as embedded properties the transition rules governing the evolution of a sleep stage diagram from a complete traverse of the data sets comprising a montage. Good examples are the onset and end of Stage REM sleep, and several subtle differences between Stage 1 (drowsing) and Stage REM. REM sleep is accessible from Stages 1, 2, 3 or 4 but particularly from Stages 1 or 2 the rules are complicated, depending not only on events in the current epoch and the preceding epoch stage, but also on "arousals" during the previous epoch.
A mini-tutorial accompanies most steps in the configuration process. The user is walked through a process similar to the one he is attempting, and is also able to get detailed, context-sensitive help on any configuration topic.
At the present time, ARK is oriented to human sleep scoring, principally that of normal adults. During the two year Phase II time span, refinements and extensions will be included to extend the analysis capability to infants, based upon "A Manual of Standardized Terminology, Techniques and Criteria for Scoring of States of Sleep and Wakefulness in Newborn Infants" by Thomas Anders, Robert Emde and Arthur Parmelee, published by the Brain Information Service, and to the elderly, for which there is at present no standardized scoring manual. In addition, an extension to work on animals may prove viable, such as described in "A Manual for Standardized Scoring of Sleep and Waking States in the Adult Cat" by Reidun Ursin and Maurice Sterman. There are extensions to sleep disorder analyses in the adult and abnormal sleep states in animals (e.g., REM sleep without atonia).
There are a number of physiological patterns of activity that are behavioral state-dependent and are extremely useful for analysis and interpretative purposes. For example, body temperature, heart rate, patterns of eye movements in humans and animals as well as PGO activity in animals provide additional information that will extend ARK's capabilities.