/**
 * Meta-Learner for Adaptive Compression
 *
 * Implements adaptive interpolation and token retention.
 */
export interface CompressionFeatures {
    entropy: number;
    taskEmbedding: number[];
    layerDepth: number;
    magnitudeRatio: number;
    cosineSimilarity: number;
}
export declare class AdaptiveInterpolator {
    private w1;
    private w2;
    private b;
    /**
     * Adaptive interpolation: t^{l,l-1} = σ(w1 * mag_ratio + w2 * cos_sim + b)
     * Bounds t to [0.3, 0.7]
     */
    computeT(features: CompressionFeatures): number;
    /**
     * Update weights (simple gradient descent)
     */
    update(features: CompressionFeatures, targetT: number, learningRate?: number): void;
    /**
     * Extract features from layer outputs
     */
    extractFeatures(attentionMatrix: number[][], taskQuery: string, layerIndex: number, totalLayers: number, currentLayer: number[], previousLayer: number[]): CompressionFeatures;
    private computeEntropy;
    private simpleEmbedding;
    private magnitudeRatio;
    private cosineSimilarity;
}
export declare class TokenRetention {
    private gamma;
    setGamma(g: number): void;
    /**
     * Token Retention Threshold:
     * I = {i | d_i < d_min + (d_max - d_min) * γ}
     * where d_i = (1/π) * arccos(cos_sim_i) is angular distance
     */
    computeRetentionMask(currentLayer: number[][], previousLayer: number[][]): boolean[];
    /**
     * Get retained tokens
     */
    getRetained(layer: number[][], mask: boolean[]): number[][];
    /**
     * Get removed tokens
     */
    getRemoved(layer: number[][], mask: boolean[]): number[][];
    /**
     * Estimate retention ratio
     */
    getRetentionRatio(mask: boolean[]): number;
    private cosineSimilarity;
}
export declare class MetaLearner {
    private interpolator;
    private retention;
    constructor();
    /**
     * Predict compression decision
     */
    predict(attentionMatrix: number[][], taskQuery: string, layerIndex: number, totalLayers: number, currentLayer: number[], previousLayer: number[]): {
        shouldMerge: boolean;
        t: number;
        gamma: number;
    };
    /**
     * Apply compression and get result
     */
    compress(currentLayer: number[][], previousLayer: number[][], taskQuery: string, layerIndex: number, totalLayers: number, attentionMatrix: number[][]): {
        merged: number[][];
        retained: number[][];
        removed: number[][];
        mask: boolean[];
    };
    /**
     * Update from feedback (simple learning)
     */
    update(features: CompressionFeatures, actualQuality: number, expectedQuality: number): void;
}
export declare const createMetaLearner: () => MetaLearner;
export declare const createAdaptiveInterpolator: () => AdaptiveInterpolator;
export declare const createTokenRetention: () => TokenRetention;
