Amazon SageMaker AI と FHE を用いたエンドツーエンド暗号化 ML 推論の紹介
AWS は、Amazon SageMaker AI と FHE(完全準同型暗号)を組み合わせることで、医療やエネルギー分野など機密データを扱う ML 推論において、データがクラウド側でも復号されないよう保護する新アプローチを発表した。
キーポイント
FHE を活用した完全暗号化推論の実現
Amazon SageMaker AI と FHE(Fully Homomorphic Encryption)を統合し、クエリ、レスポンス、中間値がすべて暗号化された状態で処理される仕組みを提供する。
高レベルライブラリ Concrete-ML の採用
前回の低レベルな実装(SEAL ライブラリ)から進化し、Concrete-ML という高レベルライブラリを用いることで、より柔軟で汎用的なモデル推論を容易にする。
厳格な規制下での業界別ユースケース
医療(患者情報の非開示)、エネルギー(機密衛星画像の保護)、通信(顧客メールの暗号化)など、データプライバシーが最優先される分野での実用性を示す。
クラウドプロバイダー自身によるデータ非可視性
推論プロセスにおいて、AWS SageMaker AI 自体を含め、クラウド側の観測者がデータを閲覧・解読できないことを保証するセキュリティモデルを確立した。
トレーニングロジックの実装
`do_training`関数内でデータ読み込みとモデル学習を実装し、`FHEModelDev`の`save`メソッドを使用して暗号化されたモデルを保存する必要があります。
カスタムフレームワークの作成
SageMaker AIにトレーニングコンテナを統合するために、`framework.py`ファイルを作成し、`sagemaker.estimator.Framework`クラスを継承した独自の実装を行うことが推奨されます。
SageMakerのモデル関数要件
SageMaker AIは`model_fn`関数の存在を要求しますが、この特定のトレーニングスクリプトでは使用されないため、実装せず`NotImplementedError`を発生させる必要があります。
影響分析・編集コメントを表示
影響分析
この発表は、機密データを扱う企業や組織が、クラウドコンピューティングのスケーラビリティとセキュリティの両立を実現するための決定的な技術的マイルストーンとなる。特に医療や金融など厳格な規制下にある業界において、データ主権を維持したまま AI 活用を進める道を開くものであり、クラウド ML の普及に大きな影響を与える。
編集コメント
従来の暗号化技術ではクラウド側で復号する必要がありましたが、FHE の実用化により「データを使いつつ見せない」という夢のようなセキュリティが現実味を帯びてきました。AWS が既存の SageMaker エコシステムに高レベルな FHE ライブラリを統合した点は、現場エンジニアにとって導入ハードルを劇的に下げる重要な一歩です。
機械学習(ML)推論では、医療記録や機密性の高いビジネス情報、個人間の通信など、機微なデータを処理することがよくあります。もしクラウド上でデータ自体を隠蔽しながら ML 推論を実行できたらどうでしょうか?より具体的には、ML 推論プロセス全体を通じてデータが暗号化された状態のまま維持されるように強制できるならどうでしょうか?本記事では、完全同種暗号(FHE)を活用して Amazon SageMaker AI とともに ML 推論を行う方法をご紹介します。FHE を用いることで、クエリ、レスポンス、中間値のすべてを暗号化し、観測者(SageMaker AI 自身を含む)が読み取れないようにする ML 推論のアプローチを紹介します。
FHE は、復号することなく暗号化された形式のままデータを処理できる暗号方式の一つです。ML 推論の文脈では、これを応用して、モデルを暗号化されたクエリに適用し(復号せず)、暗号化された予測結果を生成することができます。このような機能が価値を発揮するシナリオとして、以下のようなものが考えられます:
- ヘルスケア:ある健康保険会社が、診断データに基づいて医療処置の結果を予測する機械学習モデルを医師に提供したいと考えています。モデルをクラウド上に公開することでデプロイが簡素化されますが、プライバシー規制により、医師は患者の医療情報を第三者に開示できません。
- エネルギー分野:石油・ガス企業は、潜在的な掘削地点の衛星画像を評価し、さらに専門家の評価を行うべき画像を選択するために機械学習を利用しています。コスト削減のためにモデルをクラウド上にホストしたいと考えていますが、政治的に敏感な場所の写真を第三者に開示することはできません。
- 通信分野:ある通信事業者は、スパムやフィッシングを検出するために顧客のメールを処理したいと考えています。スケーラビリティのためにはクラウドベースの機械学習が必要ですが、データ保護規制により、顧客のメッセージは第三者においても暗号化されたまま維持されなければなりません。
本ブログでは以前、Amazon SageMaker エンドポイントで完全準同型暗号を有効にして安全なリアルタイム推論を実現するという投稿で、機械学習推論における FHE(完全準同型暗号)について取り上げました。しかし、今回の投稿ではさらに一歩踏み込んでいます。以前の投稿では、SEAL という低レベルライブラリを使用して線形回帰アルゴリズムを手作業で設計することで、FHE ベースの推論を「ゼロから」実装する方法を示しました。一方、今回の投稿では、FHE による推論のために特別に構築された高レベルライブラリである concrete-ml に基づく、はるかに柔軟でより高水準のアプローチを紹介しています。このライブラリは、一般的なモデルタイプを「そのまま」サポートしており、よく知られた機械学習ライブラリである scikit-learn と API 互換性さえ有しています。
本記事では、以下の内容について学びます:
- カスタムコンテナを使用して SageMaker AI で concrete-ml モデルをトレーニングする
- そのモデルを SageMaker AI 推論エンドポイントにデプロイする
- concrete-ml 推論用のカスタムクライアントを作成する
- そのクライアントを使用して推論エンドポイントへクエリを実行する
完了すると、SageMaker AI で concrete-ml を使用した、エンドツーエンドの暗号化された機械学習推論を行うように設計されたシステムが完成します。
ソリューション概要
SageMaker AI で concrete-ml を使用する仕組みは以下の通りです:
- モデル所有者は、トレーニング用のデータを準備します。Concrete-ml は、すべての特徴量が [-1, 1] のように同じスケールに正規化されている場合にうまく機能します。
- モデル所有者は、このデータを使用して、FHE(同種暗号化)対応のモデルバージョンをトレーニングします。このモデルは、平文ではなく暗号化されたデータ上で計算を実行するように設計されています。
- モデル所有者はこのモデルを SageMaker AI にホストします。
- クライアントは、モデルがサポートする FHE スキームを使用してクエリを暗号化します。
- クライアントは、暗号化されたクエリをクラウド上の FHE 対応モデルに送信します。
- モデルは、FHE 計算中に値を復号化することなく、暗号化されたクエリを暗号化された予測に変換します。
- モデルは暗号化された応答をクライアントに戻し、クライアントはそれを復号化して予測を取得します。
これは、Amazon Web Services (AWS) の Nitro System を Amazon Elastic Compute Cloud (Amazon EC2) で提供する機密コンピューティング環境とは異なり、それを補完するものです。AWS Nitro Enclaves では、クエリは堅牢化され隔離された環境内で平文として復号化・処理されますが、この環境は CPU およびメモリの分離を提供します。一方、FHE を使用する場合、クエリは終始暗号化されたまま維持され、セキュリティはハードウェアやソフトウェアではなく数学に依存しています。
前提条件
このソリューションを実装するには、以下のものが必要です:
- Python 3.12 がインストールされたローカル開発環境、pip を使用したパッケージのインストール機能、および Docker または他のコンテナ構築ソフトウェアがローカルにインストールされていること。なお、本手順では仮想環境での作業を推奨しますが、これは必須ではありません。
- AWS アカウント(以下を含む):
トレーニング用および推論用コンテナのイメージを格納するための Amazon Elastic Container Registry (Amazon ECR) のリポジトリ、
- Amazon Simple Storage Service (Amazon S3) の場所(以下を格納するため):
モデル
- トレーニングコード(モデルとは別のバケットに保存したい場合)
- キーと暗号文
Amazon S3 の セキュリティベストプラクティス を遵循することを推奨します。
- AWS Identity and Access Management (IAM) のロール(以下用):
モデル作成者
- 推論エンドポイント作成者
- 推論エンドポイント自体
- クライアント
これらのロールに対する IAM ポリシーおよび MNIST 手書き数字コーパス の実装例は、サンプルコードのリポジトリ で確認できます。
開始前に、執筆時点では concrete-ml は Zama から提供されており、プロトタイピングまたは非商用利用 には有料ライセンスを必要としません。ただし、商用利用には 商用ライセンス が必要となる場合があります。
トレーニング

トレーニングコンテナの構築とデプロイ
トレーニングコンテナを構築するには:
- モデルトレーナーロールを想定します。
- ローカルで Dockerfile.training ファイルを作成します。
- 以下の内容を Dockerfile.training に追加します:
FROM python:3.12
RUN apt-get update && apt-get upgrade -y && apt-get clean
RUN apt-get -y install --no-install-recommends cmake
RUN pip install sagemaker_training==5.1.1 concrete-ml==1.9.0 concrete-python==2.10.0 torch==2.3.1
システム全体でバージョン番号が一致していることを確認してください。concrete-ml ライブラリでは、Python、concrete-ml パッケージ、および concrete-python パッケージのシステム全体でバージョンの整合性が必須です。
- コンテナイメージを構築します:
docker build -f ./Dockerfile.training
- Amazon ECR にイメージプッシュします:
Docker を Amazon ECR リジストリにログインさせる認証コマンドを実行します:
aws ecr get-login-password --region | docker login --username AWS --password-stdin .dkr.ecr..amazonaws.com
- リポジトリ名を使用してイメージにタグを付けます:
docker tag * .dkr.ecr..amazonaws.com/:latest
- タグ付けされたイメージをプッシュします:
docker push .dkr.ecr..amazonaws.com/:latest
コンテナが利用可能であることを確認する
aws ecr describe-images --repository-name
画像に非空の imageDigest フィールドと latest タグが含まれた JSON 出力が表示されるはずです。
モデルのトレーニング
モデルをトレーニングするには、以下の手順を実行してください。
注: これらのステップでは、concrete-ml は他の ML フレームワークと何ら変わりなく、トレーニングコンテナも他の カスタムトレーニングコンテナ と同様です。トレーニングは平文* データ上で行われる点にご注意ください。つまり、concrete-ml は正規化以外のデータ前処理を必要としません。ただし、通常のトレーニングで追加の前処理が必要な場合は、ここでもその前処理が必要となります(トレーニングジョブの前、または一部として行われなければなりません)。
トレーニングスクリプトの作成
- training_script.py という名前のファイルを作成します。
- 以下のテンプレートコードを training_script.py に追加します:
import argparse
import os
import numpy
from concrete.ml.sklearn import
from concrete.ml.deployment import FHEModelDev
def do_training(model_dir, train):
# train ディレクトリからデータをロードする
# モデルインスタンスをトレーニングし、以下の行で保存する
FHEModelDev(model_dir, model).save()def model_fn(model_dir):
# SageMaker AI はこの関数の存在を要求しますが、実際には使用しません
raise NotImplementedError
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR'])
parser.add_argument('--train', type=str, default=os.environ['SM_CHANNEL_TRAINING'])
args = parser.parse_args()
do_training(args.model_dir, args.train)
- do_training 関数内でデータ読み込みロジックを実装してください。
- do_training 関数内でモデル学習ロジックを実装してください。
カスタムフレームワークの作成
利便性を考慮し、トレーニングコンテナを SageMaker AI に統合するために、独自の framework(フレームワーク)を作成することを推奨します。その手順は以下の通りです:
- framework.py という名前のファイルを作成してください。
- framework.py には以下の内容を追加してください:
from sagemaker.estimator import Framework
class Concrete(Framework):
def __init__(
self,
entry_point,
source_dir=None,
hyperparameters=None,
py_version="py312",
framework_version="1.9.0",
distributions=None,
**kwargs,
):
self.image_uri =
super(Concrete, self).__init__(
entry_point, source_dir, hyperparameters,
image_uri=self.image_uri,
**kwargs
)
self.framework_version = framework_version
self.py_version = py_version
def training_image_uri(self, region=None):
return self.image_uri
def create_model(
self,
model_server_workers=None,
role=None,
vpc_config_override=None,
entry_point=None,
source_dir=None,
dependencies=None,
image_name=None,
**kwargs,
):
return None
- 画像 URI の値を、ご自身の Amazon ECR(Elastic Container Registry)のトレーニングコンテナの場所と更新してください。
トレーニングジョブの実行
このセクションでは、Python スクリプトを使用してトレーニングジョブを実行する方法を示しますが、AWS コンソールまたは AWS Command Line Interface (AWS CLI) を使用して行うことも可能です。(注:トレーニングジョブは、インスタンスの種類と実行時間に基づいて課金されます。)
- Python 3.12 のための仮想環境を作成してください。
- 仮想環境をアクティブ化してください。
- pip を使用して以下のパッケージをインストールしてください:
boto3==1.37.38
sagemaker==2.243.2
- start_training.py という名前のファイルを作成してください。
- 以下の内容を start_training.py に追加してください:
from sagemaker import session
from framework import Concrete
sagemaker_session = session.Session()
concrete = Concrete(
entry_point="training_script.py",
instance_count=1,
instance_type="ml.m5.xlarge", # Use ml.m5.xlarge for small models, ml.m5.4xlarge for larger models
role="arn:aws:iam::123456789012:role/SageMakerModelTrainerRole", # Use the model-trainer role ARN from Prerequisites
sagemaker_session=sagemaker_session,
hyperparameters={},
output_path="s3://my-model-bucket/concrete-ml/models/", # Use the model bucket from Prerequisites
code_location="s3://my-model-bucket/concrete-ml/scripts/", # S3 path for training script storage
)
concrete.fit(inputs=)
- Update the instance_type, role, output_path, code_location, and inputs values with your specific configuration.
- Execute this file:
python start_training.py
- Verify that the training completed successfully by checking the training job status:
aws sagemaker describe-training-job --training-job-name
Look for TrainingJobStatus: Completed. Then verify that the output files exist:
aws s3 ls s3://my-model-bucket/concrete-ml/models/
Confirm server.zip and client.zip are present.
After training completes, the training container saves two files to the model bucket: server.zip (used by the inference endpoint) and client.zip (used by clients to encrypt queries).
Inference

推論コンテナの構築とデプロイ
FHE(同種暗号化)に基づく機械学習推論は、いくつかの新しい技術的制約により、標準的な機械学習推論よりも複雑になります。
- クライアントは、暗号鍵を生成するために client.zip からモデル固有の情報が必要です。
- FHE 暗号文は SageMaker AI のクエリサイズ制限を超える可能性があるため、クライアントとサービスは SageMaker API 呼び出しの外で暗号文を通信する必要があります。
- FHE 評価には SageMaker AI のタイムアウトよりも長い時間がかかる可能性があり、そのため推論には非同期推論用の SageMaker メカニズムが使用されます。
- エンドポイントは FHE 評価を実行するために、クライアントから評価鍵(公開鍵の一種)を受け取る必要があります。
これらの新しい要件に対応し、ユーザー体験を合理化するため、以下のシステム構築方法をご紹介します。
- カスタムクライアントがクエリを暗号化し、評価鍵を付加する
- カスタムトレーニングエンドポイントが必要に応じて client.zip を取得し、それを使用して FHE モデルを評価する
- 同じカスタムクライアントがトレーニングエンドポイントからの予測結果を復号化する
- クライアントとエンドポイントは Amazon S3 を使用して暗号文と鍵を互いに通信する
このシステムを展開して利用するには、以下のセクションを完了してください。
プリディクタ(推論器)の作成
predictor.py という名前のファイルを作成し、以下の内容で記述します
原文を表示
Machine learning (ML) inference often requires processing sensitive data—medical records, proprietary business information, or personal communications. What if you could run ML inference in the cloud while hiding your data from the cloud itself? More specifically, what if you could enforce that your data stayed encrypted throughout the entire ML inference process? This post will show you how to use Amazon SageMaker AI with fully homomorphic encryption (FHE) to perform ML inference. Using FHE, we present an approach to ML inference that’s designed to keep queries, responses, and intermediate values encrypted and unreadable by observers—including SageMaker AI itself.
FHE is a form of encryption that allows encrypted data to be processed in encrypted form without decryption. In the ML inference setting, you can use it to apply a model to an encrypted query without decryption, producing an encrypted prediction. Consider these scenarios where such a capability would provide value:
- Healthcare: A health insurance company wants to provide doctors with an ML model that predicts medical procedure outcomes based on diagnostic data. Publishing the model in the cloud simplifies deployment, but doctors can’t expose patient medical information to third parties due to privacy regulations.
- Energy sector: An oil and gas corporation uses ML to evaluate satellite photos of potential drill sites and select photos for further expert evaluation. They want to host the model in the cloud for cost savings but can’t expose photographs of politically sensitive locations to third parties.
- Telecommunications: A telecom operator wants to process customer emails to detect spam and phishing. They need cloud-based ML for scalability, but data protection regulations require that customer messages remain encrypted at third parties.
This blog has previously discussed FHE for ML inference in the post Enable fully homomorphic encryption with Amazon SageMaker endpoints for secure, real-time inferencing, but this post goes a little further. That previous post showed how to implement FHE-based inference ‘from scratch’ by hand-crafting a linear-regression algorithm using a low-level library called SEAL. Instead, this post shows a much more flexible and higher-level approach based on concrete-ml, a high-level library built specifically for FHE-based inference. It supports several common types of models ‘out of the box’ and is even API compatible with the well-known ML library scikit-learn.
In this post, you will learn how to:
- Train a concrete-ml model in SageMaker AI using a custom container
- Deploy that model to a SageMaker AI inference endpoint
- Create a custom client for concrete-ml inference
- Use that client to make queries to your inference endpoint
When finished you will have a system that uses concrete-ml in SageMaker AI designed to perform end-to-end encrypted ML inference.
Solution overview
Using concrete-ml in SageMaker AI works as follows:
- The model owner prepares their data for training. Concrete-ml works well when all features have been normalized to the same scale, such as [-1, 1].
- The model owner uses this data to train an FHE-enabled version of their model. This model is designed to perform computations over encrypted data instead of plaintext.
- The model owner hosts this model in SageMaker AI.
- Clients encrypt their queries using the FHE scheme supported by the model.
- Clients send encrypted queries to the FHE-enabled model in the cloud.
- The model transforms the encrypted query into an encrypted prediction without decrypting values during the FHE computation.
- The model returns the encrypted response to the client, who decrypts it to retrieve the prediction.
This differs from, and complements, confidential computing environments like those provided by the Amazon Web Services (AWS) Nitro System in Amazon Elastic Compute Cloud (Amazon EC2). With AWS Nitro Enclaves, queries are decrypted and processed in plaintext within hardened, isolated environments that provide CPU and memory isolation. With FHE, queries remain encrypted throughout; security relies on mathematics rather than hardware or software.
Prerequisites
To implement this solution, you need:
- A local development environment with Python 3.12 installed, the ability to install packages using pip, and Docker or other container-building software installed locally. In addition, these instructions will recommend that you work in virtual environments, but this isn’t strictly necessary.
- An AWS account, containing:
Repositories in Amazon Elastic Container Registry (Amazon ECR) to hold the images for training and inference containers,
- Locations in Amazon Simple Storage Service (Amazon S3) to hold:
The model
- The training code (if you wish it to be stored in a separate bucket from the model)
- Keys and ciphertexts
We suggest you follow the security best practices for Amazon S3.
- Roles in AWS Identity and Access Management (IAM) for
The model creator
- The inference endpoint creator
- The inference endpoint itself
- The clients
Find IAM policies for these roles, along with a worked example for the MNIST corpus of handwritten digits, in the repository of sample code.
Before starting, note that at the time of writing, concrete-ml is available from Zama for prototyping or non-commercial use without requiring a paid license. However, you may require a commercial license for commercial use.
Training

Build and deploy the training container
To build the training container:
- Assume the model-trainer role.
- Create a Dockerfile.training file locally.
- Add the following content to Dockerfile.training:
FROM python:3.12
RUN apt-get update && apt-get upgrade -y && apt-get clean
RUN apt-get -y install --no-install-recommends cmake
RUN pip install sagemaker_training==5.1.1 concrete-ml==1.9.0 concrete-python==2.10.0 torch==2.3.1Verify that the version numbers match across the entire system. The concrete-ml library requires version parity across the entire system for Python, the concrete-ml package, and the concrete-python package.
- Build the container image:
docker build -f ./Dockerfile.training- Push the image to Amazon ECR:
Run the authentication command to log in Docker to your Amazon ECR registry:
aws ecr get-login-password --region | docker login --username AWS --password-stdin .dkr.ecr..amazonaws.com- Tag the image with your repository name:
docker tag .dkr.ecr..amazonaws.com/:latest- Push the tagged image:
docker push .dkr.ecr..amazonaws.com/:latestVerify that the container is available
aws ecr describe-images --repository-name You should see JSON output containing your image with a non-empty imageDigest field and the latest tag.
Train the model
To train the model, complete the following.
Note: in these steps, concrete-ml is no different from any other ML framework and the training container is no different from any other custom training container. Note that training occurs over *plaintext* data. That is, concrete-ml doesn’t require pre-processing of this data beyond normalization. But if additional pre-processing is necessary for regular training, it remains necessary here (and must occur before, or as part of, the training job).
Create the training script
- Create a file named training_script.py.
- Add the following template code to training_script.py:
import argparse
import os
import numpy
from concrete.ml.sklearn import
from concrete.ml.deployment import FHEModelDev
def do_training(model_dir, train):
# Load your data from the train directory
# Train your model instance, then save it
# with the following line.
FHEModelDev(model_dir, model).save()
def model_fn(model_dir):
# SageMaker AI requires this function exist but doesn't use it
raise NotImplementedError
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--model-dir', type=str, default=os.environ['SM_MODEL_DIR'])
parser.add_argument('--train', type=str, default=os.environ['SM_CHANNEL_TRAINING'])
args = parser.parse_args()
do_training(args.model_dir, args.train)- Implement the data loading logic in the do_training function.
- Implement the model training logic in the do_training function.
Create a custom framework
For convenience, we recommend that you create a custom framework to integrate your training container into SageMaker AI. To do so:
- Create a file named framework.py.
- Add the following content to framework.py:
from sagemaker.estimator import Framework
class Concrete(Framework):
def __init__(
self,
entry_point,
source_dir=None,
hyperparameters=None,
py_version="py312",
framework_version="1.9.0",
distributions=None,
**kwargs,
):
self.image_uri =
super(Concrete, self).__init__(
entry_point, source_dir, hyperparameters,
image_uri=self.image_uri,
**kwargs
)
self.framework_version = framework_version
self.py_version = py_version
def training_image_uri(self, region=None):
return self.image_uri
def create_model(
self,
model_server_workers=None,
role=None,
vpc_config_override=None,
entry_point=None,
source_dir=None,
dependencies=None,
image_name=None,
**kwargs,
):
return None- Update the image_uri value with your Amazon ECR training container location.
Launch the training job
This section will show how to launch the training job with a python script, but it can also be done using the console or the AWS Command Line Interface (AWS CLI). (Note: training jobs incur charges based on instance type and duration.)
- Create a virtual environment for Python 3.12.
- Activate the virtual environment.
- Install the following packages using pip:
boto3==1.37.38
sagemaker==2.243.2- Create a file named start_training.py.
- Add the following content to start_training.py:
from sagemaker import session
from framework import Concrete
sagemaker_session = session.Session()
concrete = Concrete(
entry_point="training_script.py",
instance_count=1,
instance_type="ml.m5.xlarge", # Use ml.m5.xlarge for small models, ml.m5.4xlarge for larger models
role="arn:aws:iam::123456789012:role/SageMakerModelTrainerRole", # Use the model-trainer role ARN from Prerequisites
sagemaker_session=sagemaker_session,
hyperparameters={},
output_path="s3://my-model-bucket/concrete-ml/models/", # Use the model bucket from Prerequisites
code_location="s3://my-model-bucket/concrete-ml/scripts/", # S3 path for training script storage
)
concrete.fit(inputs=)- Update the instance_type, role, output_path, code_location, and inputs values with your specific configuration.
- Execute this file:
python start_training.py- Verify that the training completed successfully by checking the training job status:
aws sagemaker describe-training-job --training-job-name Look for TrainingJobStatus: Completed. Then verify that the output files exist:
aws s3 ls s3://my-model-bucket/concrete-ml/models/Confirm server.zip and client.zip are present.
After training completes, the training container saves two files to the model bucket: server.zip (used by the inference endpoint) and client.zip (used by clients to encrypt queries).
Inference

Build and deploy the inference container
FHE-based ML inference will be more complex than standard ML inference because of some new technical constraints:
- Clients need model-specific information from client.zip to generate cryptographic keys.
- FHE ciphertexts can exceed SageMaker AI query size limits, so the client and service need to communicate them outside of SageMaker AI API calls.
- FHE evaluation might take longer than SageMaker AI timeouts, and so inference will use the SageMaker AI mechanisms for asynchronous inference.
- The endpoint needs an evaluation key (a type of public key) from the client to perform FHE evaluation.
To accommodate these new requirements and to streamline the user’s experience, we show you how to build a system in which
- A custom client encrypts queries and attaches evaluation keys to them
- A custom training endpoint retrieves client.zip when needed, and uses it to evaluate the FHE model
- The same custom client decrypts predictions from the training endpoint
- The client and endpoint communicate ciphertexts and keys to each other using Amazon S3
To deploy and use this system, complete the following sections.
Write your predictor
Create a file named [predictor.py](https://github.com/aws-samples/sample-end-to-end-encrypted-ml-inference-with-amazon-sagemaker-ai-and-fhe/blob/main/inference/endpoint/container_files/predictor.py) with the follo
関連記事
オンラインPDF署名ツールの簡単な利用方法
記事は、契約書や法的文書の処理において、ファイル互換性などの課題がある中で、オンラインPDF署名ツールが業務と個人にとって迅速かつ安全な署名を可能にする重要な役割を果たしていることを説明しています。
Microsoft、Claude および Gemini ユーザーへマルウェアを配布する目的でハッキングされた件
サイバーセキュリティ研究者の調査と Microsoft の声明によると、ハッカーが AI コーディングツールの Claude や Gemini で開封した際にユーザーの認証情報を窃取するマルウェアを仕掛け、Microsoft は Azure および AI コーディングエージェント関連のリポジトリを含む一連の GitHub リポジトリを停止してデータ侵害を調査している。
OpenAI、プロンプト注入攻撃対策の「ロックダウンモード」を追加
OpenAI は、ウェブページや外部コンテンツからのプロンプト注入攻撃への曝露を減らすため、「ロックダウンモード」を導入した。この機能はライブブラウジングやエージェントモードなどを無効化する一方、キャッシュされたコンテンツや画像生成機能は維持する。
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み