Feature Extraction System

The feature extraction system is a core component of Superline Agent Detection that collects and processes data from browser sessions to identify patterns that distinguish between human users and AI agents.

Feature Extraction Architecture

The library uses a modular extraction system with multiple specialized extractors that each focus on different aspects of user behavior.

Default Extractors

Superline Agent Detection comes with five built-in extractors:
Collects environment data such as:
  • User agent string
  • Screen dimensions and orientation
  • Device pixel ratio
  • Color depth
  • Browser language
  • Time zone information
  • Platform details
These features help identify unusual or inconsistent browser configurations that may indicate an AI agent.
Analyzes mouse movements and patterns including:
  • Movement speed and acceleration
  • Direction changes and curvature
  • Hover behavior
  • Movement patterns and distribution
  • Start and stop characteristics
Human mouse movements typically have natural irregularities and acceleration patterns, while AI agents often exhibit more uniform or simplified movement patterns.
Tracks keyboard patterns such as:
  • Typing speed and rhythm
  • Key press duration
  • Inter-key intervals
  • Common vs. uncommon key combinations
  • Correction patterns
Humans typically have distinctive typing rhythms and error patterns, while AI agents may show unnatural consistency or irregularity.
Monitors scroll behavior including:
  • Scroll speed and acceleration
  • Scroll depth and direction changes
  • Pause patterns between scrolls
  • Scrollbar vs. wheel vs. touchpad scroll detection
Human scroll patterns typically align with content consumption patterns, while AI agents may exhibit more mechanical or content-independent scroll behaviors.
Captures click patterns such as:
  • Click timing and distribution
  • Click precision relative to targets
  • Double-click behavior
  • Click pressure and duration
  • Click location heatmap
Humans typically click with slight imprecision and variability, while AI agents may show too-perfect precision or unnatural patterns.

Feature Processing

Raw features collected by extractors undergo several processing steps:
1

Feature Collection

Extractors collect raw data from user interactions and browser environment
2

Statistical Aggregation

Raw events are aggregated into statistical features (e.g., mean, variance, distribution metrics)
3

Normalization

Features are normalized to comparable scales, often using standardization (z-scores) or min-max scaling
4

Transformation

Some features undergo non-linear transformations to improve their predictive power
5

Feature Selection

Only the most discriminative features are selected for the final model

Custom Extractors

Documentation for creating custom feature extractors is currently under development.However, the library supports extending its capabilities by creating your own extractor classes. These classes should inherit from a base FeatureExtractor class (details forthcoming) and implement the required methods for initialization, data collection, and feature computation.You can then pass your custom extractor constructors in the extractorClasses array within the AgentDetector.init() options. Providing this array will replace the default set of extractors.
// Conceptual example
import { DEFAULT_EXTRACTORS } from '@superline-ai/agent-detection';
import MyCustomExtractor from './my-custom-extractor';

AgentDetector.init({
  // To add to defaults:
  // extractorClasses: [...DEFAULT_EXTRACTORS, MyCustomExtractor],
  
  // To replace defaults:
  extractorClasses: [MyCustomExtractor]
});

Features Table

The following table shows some of the key features used by the detection model:
Feature CategoryExample FeaturesDescription
Browser MetadataUser agent, Screen dimensionsIdentify unusual browser configurations
Mouse MovementsMovement speed, CurvatureAnalyze natural vs. artificial movements
Keyboard PatternsTyping rhythm, Key press durationDetect human typing patterns
Scroll BehaviorScroll speed, Pause patternsIdentify content consumption patterns
Click PatternsClick precision, Click timingDetect natural click behavior

Privacy Considerations

The feature extraction system is designed with privacy in mind:
  • No personal information is collected or stored
  • Raw data stays local to the browser
  • Only aggregated statistical features are used for detection
  • No cross-site tracking or fingerprinting for tracking purposes
All extracted features are used solely for the purpose of distinguishing between human users and AI agents, not for tracking users across sites or sessions.

Next Steps