Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Тема 2: Децентрализованная FHE-экосистема для ИИ

Тема 2: Децентрализованная FHE-экосистема для ИИ

Конфиденциальность — это фундаментальное требование для следующего поколения ИИ, особенно в связке с блокчейн-технологиями. Без надежных гарантий приватности

ИИ-приложения сталкиваются с серьезными ограничениями в сфере безопасности, соответствия регуляторным требованиям и доверия пользователей. Это становится особенно критично в эпоху мультиагентных систем и автономных ИИ-агентов, где необходимо защищать чувствительные взаимодействия и процессы принятия решений от несанкционированного доступа и манипуляций.

Сергей Гоменюк, Head of Development, Fair Math

Валентина Кононова, Head of AI, Fair Math

DeFrens community

April 09, 2025
Tweet

More Decks by DeFrens community

Other Decks in Programming

Transcript

  1. Moscow 2025 FHE ECOSYSTEM FOR AI > Sergey Gomenyuk &

    Valentina Kononova Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow
  2. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow Sergey Gomenyuk Head of Platform Valentina Kononova Head of AI > SPEAKERS _
  3. > 3: FHE Dev Platform > 4: FHE AI Platform

    > 1: FHE Intro > 2: integration in AI >AGENDA _ Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow
  4. >FULLY HOMOMORPHIC ENCRYPTION (FHE) >HOW IT WORKS _ m f(m)

    f(m) f(x) Dec Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow
  5. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >FULLY HOMOMORPHIC ENCRYPTION (FHE) >HOW IT WORKS _
  6. > Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk

    Location Moscow >PRIVACY HOMOMORPHISM >1978 _ > “...however, and although there are some truly inherent limitations on what can be accomplished, we shall see that it appears likely that there exist encryption functions which permit encrypted data to be operated on without preliminary decryption of the operands, for many sets of interesting operations. These special encryption functions we call “privacy homomorphisms”; they form an interesting subset of arbitrary encryption schemes (called “privacy transformations”).” Rivest, R., Adleman, L., and Dertouzos, M. (1978). On Data Banks and Privacy Homomorphisms. Massachusetts Institute of Technology. Cambridge, Massachusetts.
  7. 2009/Gentry 2012/BFV 2014/FHEW 2017/CKKS 2011/BGV 2013/GSW 2016/TFHE 1978 / RSA

    First FHE Scheme Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE >IMPORTANT MILESTONES _
  8. Schemes Data types Advantages Limitations 47 BGV/BFV Modular arithmetic operations

    over finite fields Great for vectors of relatively small integers and finite fields Slow Bootstrapping x7 FHEW/TFHE Boolean circuits Fast bootstrapping / arbitrary depth of computation Scalability h7 CKKS Approximate computations over vectors of real and complex numbers The best choice for many ML applictions Slow Bootstrapping / Approximate result Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow Location Moscow >FHE LANDSCAPE >SCHEMES _
  9. Library Schemes Languages License OpenFHE BFV, BGV, CKKS, DM/FHEW, CGGI/TFHE,

    LMKCDEY C/C++, Python, Rust BSD 2-Clause Lattigo BFV, BGV, CKKS, LMKCDEY Go Apache-2.0 tfhe-rs CGGI/TFHE rust BSD 3-Clause Clear License. Dual license SEAL BFV, BGV, CKKS C++/Python MIT License Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow Location Moscow >FHE LANDSCAPE >LIBRARIES _
  10. x1 x2 x3 xN RELU RELU RELU RELU SIGN SIGN

    SIGN SIGN SIGM SIGM SIGM SIGM Input Layer Internal Layers Output Layer Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW IT WORKS _
  11. w1 x1 x2 x3 xN w2 w3 wN weighted_sum =

    bias+x1*w1+x2*w2+x3*w4+ .. +xN*wN output output= RELU (weighted_sum) RELU Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW IT WORKS _
  12. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >FULLY HOMOMORPHIC ENCRYPTION (FHE) >HOW IT WORKS _
  13. w1 x1_enc x2_enc x3_enc xN_enc w2 w3 wN weighted_sum= bias+x1_enc*w1+x2_enc*w2+x3_enc*w4+

    .. +xN_enc*wN output output= RELU (weighted_sum) RELU Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW IT WORKS _
  14. weighted_sum= bias+x1_enc*w1+x2_enc*w2+x3_enc*w4+ .. +xN_enc*wN Problem output= RELU (weighted_sum) Date: April

    2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW IT WORKS _ w1 x1_enc x2_enc x3_enc w2 w3 wN output RELU
  15. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW IT WORKS _
  16. 1. Polynomial Approximation 2. Play with packing 3. Functional Bootstrapping

    (PBS) Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW TO EVALUATE RELU (ENC(X)? _
  17. This is hard stuff for someone in AI! Date: April

    2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW TO EVALUATE RELU (ENC(X)? _ 1. Polynomial Approximation 2. Play with packing 3. Functional Bootstrapping (PBS)
  18. RELU E(X) E(RELU(X)) Date: April 2025 Speaker: Valentina Kononova Speaker:

    Sergey Gomenyuk Location Moscow >PRIVACY PRESERVING NEURAL NETWORK >HOW TO EVALUATE RELU (ENC(X)? _
  19. SIGN E(X) E(SIGN(X)) RELU E(X) E(RELU(X)) COS E(X) E(COS(X)) SHIFT

    B SHIFT B ROTATE C ROTATE C MAX T L2 T LN T L1 C Bridge Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE COMPONENTS >BUILDING BLOCKS _
  20. >POLYCIRCUIT >FHE COMPONENTS _ Date: April 2025 Speaker: Valentina Kononova

    Speaker: Sergey Gomenyuk Location Moscow > Polycircuit is an open- source platform for storing and distributing FHE Components > Support and Community Engagement > Storage and Distribution platform for generalized FHE components > Wide range of validated and optimised functionality
  21. >FHERMA.IO >FHERMA FHE CHALLENGES _ Date: April 2025 Speaker: Valentina

    Kononova Speaker: Sergey Gomenyuk Location Moscow > FHERMA is a joint project by Fair Math and OpenFHE teams. > Fully automated and transparent > Library agnostic > Black Box & White Box Challenges
  22. FHERMA.IO - FHE Challenges FHE Components Date: April 2025 Speaker:

    Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE COMPONENTS >FHERMA.IO _
  23. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >FHELANG >HELLO WORLD _ >Text text X fn neuron(inputs: [secret<i32>; N], weights: [secret<i32>; N], bias: secret<i32>) -> secret<i32> { let mut weighted_sum: secret<i32> = bias; // Calculate the weighted sum of inputs and weights for i in 0..N { weighted_sum = weighted_sum + inputs[i] * weights[i]; } // Apply an activation function from Polycircuit let output = polycircuit::relu(weighted_sum); return output; }
  24. Secret: Generic FHE Dialect Polycircuit: FHE Components FHE Computer (Instruction)

    Dialect R/LWE NTRU ... CKKS BGV BFV .. FHE Schemes FHE Math MLIR Levels Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHELANG >MLIR LEVELS _
  25. Secret: Generic FHE Dialect Polycircuit: FHE Components FHE Computer (Instruction)

    Dialect R/LWE NTRU ... CKKS BGV BFV .. Extendable Levels Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHELANG >COMPILER _
  26. How to deploy and run? Date: April 2025 Speaker: Valentina

    Kononova Speaker: Sergey Gomenyuk Location Moscow
  27. ACtor 1 Actor 3 Actor 2 RELU CKKS SHIFT BFV

    ROTATE CKKS ROTATE CKKS SIGNUM BGV MAX TFHE L2 TFHE LN TFHE MIN BFV SORT TFHE L1 CKKS Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE COMPUTER >ACTORS _
  28. ACtor 1 Actor 3 Actor 2 RELU CKKS SHIFT BFV

    ROTATE CKKS ROTATE CKKS SIGNUM BGV MAX TFHE L2 TFHE LN TFHE MIN BFV SORT TFHE L1 CKKS SHIFT B SHIFT B ROTATE C ROTATE C MAX T L2 T LN T L1 C Bridge Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE COMPUTER >ACTORS _
  29. ACtor 1 Actor 3 Actor 2 RELU % SHIFT %

    ROTATE % ROTATE % SIGNUM % MAX % L2 % LN % MIN % SORT % L1 % Execution Layer Verification Layer ORCHESTRATION Layer Application Layer: FHE Apps Data Layer Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FHE COMPUTER >LAYERS _
  30. f(x) Input Model Result Date: April 2025 Speaker: Valentina Kononova

    Speaker: Sergey Gomenyuk Location Moscow >ML MODEL _
  31. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >ONNX FORMAT _ > *ONNX (Open Neural Network Exchange) is an open format for representing machine learning models, enabling interoperability between different frameworks (PyTorch, TensorFlow, etc.) and hardware backends, simplifying deployment and optimization. https://onnx.ai
  32. Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location

    Moscow >ONNX FORMAT _ *ONNX (Open Neural Network Exchange) is an open format for representing machine learning models, enabling interoperability between different frameworks (PyTorch, TensorFlow, etc.) and hardware backends, simplifying deployment and optimization. https://onnx.ai
  33. X Y MatMul Add RELU Date: April 2025 Speaker: Valentina

    Kononova Speaker: Sergey Gomenyuk Location Moscow >ONNX OPERATORS _
  34. X Y MatMul Add RELU X Y FHEMatMul FHEAdd ?

    Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >ONNX OPERATORS _
  35. MatMul MatMul X Y MatMul Add RELU X Y FHEMatMul

    FHEAdd FHE_RELU ONNX
 Converter Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >MODEL TRANSFORMATION >ONNX CONVERTER _
  36. ONNX Model FHE Based Model Converter Date: April 2025 Speaker:

    Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >AI HUB >ONNX CONVERTER _
  37. Location Moscow >AI HUB >ONNX CONVERTER _ A platform for

    building, sharing, deploying, and monetizing privacy-focused AI models and components.
  38. ONNX Model FHE Based Model FHE Based Model FHE Based

    Model FHE Based Model FHE Based Model Transform Push AI HUB Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >AI HUB >ONNX CONVERTER _
  39. FHE BÀÁ FHE BÀÁ FHE BÀÁ FHE BÀÁ FHE APP

    FHE APP FHE APP FHE APP Deploy AI Hub Deploy Fair Math Computer WEB3 Users WEB2 Users Run Privacy-preserving inference FHE Model FHE APP Converter Compiler Push .onnx Polycircuit: FHE Components FHERMA FHE Challenges Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey Gomenyuk Location Moscow >FAIR MATH AI ECOSYSTEM _
  40. THANK YOU Date: April 2025 Speaker: Valentina Kononova Speaker: Sergey

    Gomenyuk Location Moscow //github //linkedin //fairmath //twitter