Data-Aware Algorithms for Secure and Efficient Machine Learning Systems
Machine learning models are increasingly deployed in real-world systems where they must operate under strict inference-time constraints, including data access control, privacy guarantees, and efficiency requirements. Despite this, most modern ML pipelines are designed and evaluated in a largely data-agnostic manner: training data is freely entangled in model parameters, memorization is measured without accounting for statistical generalization, and representations are optimized without regard to how they are queried at inference time. This mismatch leads to systems that are difficult to control, difficult to interpret, and inefficient in practice. This dissertation argues for an data-aware approach to machine learning system design. It presents three complementary contributions that incorporate data structure and constraints directly into model architectures, evaluation metrics, and optimization objectives. First, it introduces information flow control for machine learning, formalizing a notion of non-interference and proposing a modular Transformer architecture that enforces access policies at inference time through secure gating and aggregation. Second, it develops Prior-Aware Memorization, an efficient, training-free metric that distinguishes genuine memorization of training data from statistical generalization, enabling more accurate measurement of privacy and copyright leakage in large language models. Third, it proposes Query-Aware Compression for semantic search, deriving an analytic, training-free compression method that minimizes similarity distortion under real query distributions. Across language modeling and large-scale retrieval tasks, empirical results demonstrate that data-aware designs can substantially improve security and efficiency with minimal overhead. Collectively, this work advances the design of machine learning systems that are aligned with real-world data constraints and provides a foundation for building models that are not only accurate, but also controllable and trustworthy.