Privacy and Security for Large Language Models. Hands-On Privacy-Preserving Techniques for Personalized AI - Helion

ISBN: 9781098160814
stron: 318, Format: ebook
Data wydania: 2026-01-12
Księgarnia: Helion
Cena książki: 228,65 zł (poprzednio: 265,87 zł)
Oszczędzasz: 14% (-37,22 zł)
As the deployment of AI technologies surges, the need to safeguard privacy and security in the use of large language models (LLMs) is more crucial than ever. Professionals face the challenge of leveraging the immense power of LLMs for personalized applications while ensuring stringent data privacy and security. The stakes are high, as privacy breaches and data leaks can lead to significant reputational and financial repercussions.
This book serves as a much-needed guide to addressing these pressing concerns. Dr. Baihan Lin offers a comprehensive exploration of privacy-preserving and security techniques like differential privacy, federated learning, and homomorphic encryption, applied specifically to LLMs. With its hands-on code examples, real-world case studies, and robust fine-tuning methodologies in domain-specific applications, this book is a vital resource for developing secure, ethical, and personalized AI solutions in today's privacy-conscious landscape.
By reading this book, you'll:
- Discover privacy-preserving techniques for LLMs
- Learn secure fine-tuning methodologies for personalizing LLMs
- Understand secure deployment strategies and protection against attacks
- Explore ethical considerations like bias and transparency
- Gain insights from real-world case studies across healthcare, finance, and more
Osoby które kupowały "Privacy and Security for Large Language Models. Hands-On Privacy-Preserving Techniques for Personalized AI", wybierały także:
- AI w tradingu. Kurs video. Nowoczesne narz 190,00 zł, (39,90 zł -79%)
- Sztuczna inteligencja w Azure. Kurs video. Uczenie maszynowe i Azure Machine Learning Service 190,00 zł, (39,90 zł -79%)
- Sztuczna inteligencja w Azure. Kurs video. Us 190,00 zł, (39,90 zł -79%)
- Web scraping w Data Science. Kurs video. Uczenie maszynowe i architektura splotowych sieci neuronowych 173,48 zł, (39,90 zł -77%)
- Jak zarabia 166,25 zł, (39,90 zł -76%)
Spis treści
Privacy and Security for Large Language Models. Hands-On Privacy-Preserving Techniques for Personalized AI eBook -- spis treści
- Preface
- Who Should Read This Book
- Why I Wrote This Book
- Navigating This Book
- Conventions Used in This Book
- Using Code Examples
- OReilly Online Learning
- How to Contact Us
- Acknowledgments
- 1. Introduction
- The Rise of Large Language Models
- Privacy and Security Concerns in LLMs
- What This Book Covers
- Your Role in This Journey
- Summary
- 2. Understanding Large Language Models
- Fundamentals of Large Language Models
- Basic Building Blocks of Language Models
- Neural networks
- Recurrent neural networks
- Long short-term memory networks
- Key Concepts in LLMs
- Tokenization
- Chunking
- Embeddings
- Attention mechanisms
- Context windows and sequence length
- Transfer learning and foundation models
- Discriminative versus generative models
- In-context learning
- Zero-shot and few-shot learning
- Basic Building Blocks of Language Models
- LLM Architectures
- Transformer Architecture
- Mixture of Experts Architecture
- Popular LLM Models
- Training Techniques for LLMs
- Pre-Training Techniques
- Masked language modeling
- Next sentence prediction
- Permutation Language Modeling
- Fine-Tuning Techniques
- Full fine-tuning
- Parameter-efficient fine-tuning
- Instruction fine-tuning
- Reinforcement Learning from Human Feedback
- Pre-Training Techniques
- Retrieval-Augmented Generation
- Summary
- Fundamentals of Large Language Models
- 3. Evaluating the Privacy and Security Risks of LLMs
- Privacy Metrics
- Differential Privacy
- Mathematical formulation
- Code implementation
- Privacy Loss
- Mathematical formulation
- Code implementation
- k-anonymity
- Code implementation
- Privacy Considerations in RAG Systems
- Differential Privacy
- Security Metrics
- Attack Success Rate (ASR)
- Code implementation
- False Positive Rate (FPR) for Membership Inference
- Code implementation
- Reconstruction Error for Model Inversion
- Code implementation
- Attack Success Rate (ASR)
- LLM Privacy and Security Audits
- Simulating Attacks
- Membership inference attack
- Operational definition 1: Perplexity-based attack
- Operational definition 2: Repeated prompt-based attack
- What does this mean?
- Data extraction attack
- Operational definition: Prompt-based extraction
- How does this attack work?
- Code example: Generate text for data extraction
- Enhancing the attack
- Defense: How to guard against data extraction
- Membership inference attack
- LLMPrivacySecurityEvaluator: The All-in-One Auditor
- Expanding the LLMPrivacySecurityEvaluator
- Interpreting the results
- Different personas, different approaches
- Simulating Attacks
- Modern Evaluation Frameworks and Benchmarks
- Summary
- Privacy Metrics
- 4. Privacy-Preserving Training Techniques
- A Real-World Example of Privacy Breach in the Training Phase
- Synthetic Data for Privacy Evaluation
- Why synthetic data?
- How to Apply LLMPrivacySecurityEvaluator on Your Data
- Synthetic Data for Privacy Evaluation
- Differential Privacy for LLMs
- The Mathematical Foundation
- Implementing DP-SGD for LLMs
- Privacy Accounting in Practice
- Trade-Offs and Considerations
- Applying Differential Privacy to Retrieval-Augmented Generation
- Federated Learning with LLMs
- The Concept
- Implementing Federated Learning for LLMs
- Advantages and Challenges of Federated Learning
- Homomorphic Encryption in LLMs
- The Concept
- Implementing HE for LLMs
- Advantages and Challenges of Homomorphic Encryption
- Multi-Party Computation for Secure Aggregation
- The Concept
- Implementing MPC with Modern Libraries
- Advantages and Challenges of MPC
- Parameter-Efficient Fine-Tuning for Privacy
- Low-Rank Adaptation
- Quantized Low-Rank Adaptation
- Privacy-Preserving Data Transformation
- Data Anonymization and De-Identification
- Privacy-Preserving Data Augmentation
- Advantages and Challenges of Privacy-Preserving Data Augmentation
- Summary
- A Real-World Example of Privacy Breach in the Training Phase
- 5. Secure Deployment of LLMs
- Secure Model Hosting and Infrastructure
- Understanding Infrastructure Components
- Isolation Strategies
- Containerization
- Virtual machines
- Network Security
- Network architecture design
- HTTPS and TLS implementation
- Resource Management and Monitoring
- Secure APIs and Communications
- API Design Principles
- Implementation of Secure APIs
- Authentication and Authorization
- Secure Communication
- Symmetric encryption: AES-256
- Network-level encryption: WPA3
- Implementing encryption standards in LLMs
- Secure Model Versioning and Updates
- Model Registry and Version Control
- Secure Update Process
- Summary
- Secure Model Hosting and Infrastructure
- 6. Adversarial Attacks and Defenses
- Understanding Adversarial Attacks on LLMs
- Taxonomy of Adversarial Attacks on LLMs
- Notable Attack Methods
- Jailbreaking attacks
- Adversarial prompts generation
- Universal adversarial triggers
- Embedding Space Attacks
- LLM Agent Attacks
- Impact of Model Scale and Architecture
- Case Study: Defending Against Jailbreaking Attacks
- Robust Fine-Tuning Techniques
- Adversarial Training
- Robust Optimization Techniques
- Misclassification Aware Regularization Technique (MART)
- TRade-offinspired Adversarial DEfense via Surrogate-loss minimization (TRADES)
- Data Augmentation for Robustness
- Prefix-Tuning and Prompt-Based Robustness
- Ensemble Methods
- Certifiably Robust Fine-Tuning
- Red-Teaming LLMs
- Red-Teaming Methodologies
- Manual red-teaming
- Automated red-teaming
- Implementing a Red-Teaming Program
- Red-Teaming Tools and Frameworks
- Automated Multiround Red-Teaming
- Case Study: Red-Teaming in Practice
- Red-Teaming Methodologies
- Adversarial Evaluation and Robustness Metrics
- Robustness Benchmarks
- Robustness Under Distribution Shift
- Human-in-the-Loop Evaluation
- Agent-Based Evaluation
- Standardized Attack Success Metrics
- Defense Evaluation Metrics
- Challenges in Robustness Evaluation
- Best Practices
- Future Directions in LLM Robustness
- Summary
- Understanding Adversarial Attacks on LLMs
- 7. Ethical Considerations in Fine-Tuning LLMs
- Bias and Fairness Issues in Personalization
- Understanding Bias in Fine-Tuned LLMs
- Measuring Fairness in Fine-Tuned Models
- Demographic parity (statistical parity)
- Equalized odds (error rate balance)
- Individual fairness (Lipschitz fairness)
- Calibration fairness
- Counterfactual fairness
- Bias Mitigation Strategies
- Challenges in Privacy-Preserving Bias Mitigation
- Transparency and Explainability in Fine-Tuned Models
- The Explainability Challenge in LLMs
- Techniques for Explaining LLM Behavior
- Privacy-Preserving Explainability
- Addressing AI Bias with Privacy Constraints
- The Privacy-Fairness Trade-Off
- Group-Aware Privacy Mechanisms
- Bias-Aware Federated Learning
- Privacy-Preserving Bias Auditing
- Summary
- Bias and Fairness Issues in Personalization
- 8. Navigating the Cultural, Social, and Legal Landscapes
- A New Kind of Socio-Technical Systems
- Riding Amidst an AI-Mediated Cultural Evolution
- The Rise of AI-Generated Content and the Erosion of Trust
- Personalized AI and Identity Crisis in the Age of Surveillance Capitalism
- Existential Questions in Human-Machine Interaction
- Unveiling the Generative AI Supply Chain
- The Emergence of Machine Culture
- Adaptable Legal Frameworks for Regulation and Accountability
- The Case of Copyright and Intellectual Property in the Age of LLMs
- The Case of Data Privacy and Protection in Personalized AI Systems
- The Case of Algorithmic Bias and Discrimination in AI-Powered Decision Making
- The Case of Liability and Accountability in AI-Powered Systems
- Universal Challenges to Techno-Legal Solutionism
- Building a Responsible AI Culture
- AI Safety Beyond Algorithms: The Human Elements
- Summary
- 9. Building Privacy-Preserving AI Capabilities
- Healthcare AI in Action: Differentially Private Clinical Note Analysis
- The Healthcare Privacy Challenge
- Synthetic Data as a Privacy-Preserving Foundation
- LoRA: Efficient and Privacy-Friendly Fine-Tuning
- Privacy Accounting with RDP
- Real-World Deployment Considerations
- Legal AI in Action: Federated Learning Across Law Firms or Courts
- The Legal Confidentiality Imperative
- Federated Learning Architecture for Legal AI
- Secure Aggregation and Model Updates
- Legal and Ethical Considerations in Federated Legal AI
- Performance and Utility Evaluation
- Building Your Privacy-First AI Capability
- Organizational Readiness and Implementation Strategy
- Team Structure and Technology Decisions
- Governance Integration and Success Measurement
- Preparing for Tomorrows Privacy Landscape
- Technology Convergence and Regulatory Evolution
- Market Dynamics and Competitive Positioning
- A Strategic Position for the Future
- Summary
- Conclusion
- The Transformation Youve Witnessed
- The Path Were On
- Your Role in Shaping the Future
- Healthcare AI in Action: Differentially Private Clinical Note Analysis
- Index





