import { OverlapBasedExpansionResult } from '../../overlap-result.js'; import { BetweenGraphStrategy } from './between-graph-strategy.js'; /** * Configuration for SaliencePreservingStrategy. */ export interface SaliencePreservingConfig { /** * Target percentage of nodes to preserve based on salience ranking. * Range: (0, 100] * Default: 100 (preserve all salient nodes, equivalent to full expansion result) */ targetPreservation?: number; /** * Minimum number of nodes to preserve regardless of salience. * Default: 10 (ensures basic connectivity) */ minNodes?: number; } /** * Salience-Preserving Between-Graph Strategy * * Preserves nodes and edges based on their contribution to path salience * (mutual information). This strategy aims to retain high-information paths * while discarding low-contributing regions. * * **Algorithm**: Rank nodes by their occurrence frequency in discovered paths * (as a proxy for MI contribution), then preserve nodes/edges above a threshold. * * **Complexity**: O(P × L + V log V) where P = paths, L = avg length, V = nodes * * **Thesis Alignment**: This strategy implements the thesis concept of * salience-based subgraph extraction, preserving paths that maximize mutual * information for downstream ranking tasks. * * **Note**: This is a simplified implementation using path frequency as a * proxy for MI. A full implementation would integrate with Path Salience * ranking to compute actual MI scores. */ export declare class SaliencePreservingStrategy implements BetweenGraphStrategy { /** Strategy identifier for naming SUT variants */ readonly id = "salience-preserving"; /** Target percentage of nodes to preserve */ private readonly targetPreservation; /** Minimum number of nodes to preserve */ private readonly minNodes; /** * Create a SaliencePreserving strategy. * * @param config - Strategy configuration */ constructor(config?: SaliencePreservingConfig); /** * Extract the between-graph subgraph from expansion results. * * Preserves nodes based on path salience ranking. * * @param expansionResult - Raw expansion output with all visited nodes/edges * @param _graph - Original graph (unused, we use path-based salience) * @returns Refined subgraph definition with nodes, edges, and paths */ extractBetweenGraph(expansionResult: OverlapBasedExpansionResult, _graph?: unknown): { nodes: Set; edges: Set; paths: Array<{ fromSeed: number; toSeed: number; nodes: string[]; }>; }; /** * Calculate node salience based on path occurrence frequency. * * Nodes that appear in more paths have higher salience scores. * This is a simplified proxy for mutual information contribution. * * @param paths - Discovered paths from expansion * @returns Map of node ID to salience score * @private */ private calculateNodeSalience; } //# sourceMappingURL=salience-preserving.strategy.d.ts.map