SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.07177 · 2022

Characterizing and Optimizing End-to-End Systems for Private Inference

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2207.07177.json · badge: /api/ran/2207.07177.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kvgarimella/characterizing-private-inference canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
get_data Ran
ran on a synthesized input
kvgarimella/characterizing-private-inference/artifact/client_vs_server.py
code served (permissive licence) · get_code("436dbb098b2c74c8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import numpy as np
import tempfile
import shutil

# Create a temporary directory structure with necessary files
temp_base = tempfile.mkdtemp()

# Create a subdirectory with 'ds_nw' in its name
test_dir_name = 'test_ds_nw_001'
test_dir_path = os.path.join(temp_base, test_dir_name)
os.makedirs(test_dir_path)

# Create dummy numpy files with the expected naming convention
prefix = 'exp'
np.save(os.path.join(test_dir_path, f'{prefix}_garbler_arrival_rates.npy'), np.array([1.0, 2.0, 3.0]))
np.save(os.path.join(test_dir_path, f'{prefix}_garbler_avg_inf_times.npy'), np.array([0.5, 1.5, 2.5]))
np.save(os.path.join(test_dir_path, f'{prefix}_garbler_avg_waiting_times.npy'), np.array([0.1, 0.2, 0.3]))
np.save(os.path.join(test_dir_path, f'{prefix}_garbler_left_to_service.npy'), np.array([10, 20, 30]))
np.save(os.path.join(test_dir_path, f'{prefix}_garbler_total_num_clients.npy'), np.array([100, 200, 300]))

# Create args.json file
args_dict = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10,
    'model': 'test_model'
}
with open(os.path.join(test_dir_path, 'args.json'), 'w') as f:
    json.dump(args_dict, f)

# Define the arguments for get_data function
ARGS = {
    'ds_nw': 'ds_nw',
    'base': temp_base
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_data Ran
ran on a synthesized input
kvgarimella/characterizing-private-inference/artifact/latency_breakdown_server_garbler.py
code served (permissive licence) · get_code("d39a3ad746698546")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import numpy as np
import tempfile
import shutil

# Create a temporary directory structure with mock data
temp_base = tempfile.mkdtemp()

# Create two mock directories with "ds_nw" in their names
dir1 = os.path.join(temp_base, 'experiment_ds_nw_001')
dir2 = os.path.join(temp_base, 'experiment_ds_nw_002')
os.makedirs(dir1, exist_ok=True)
os.makedirs(dir2, exist_ok=True)

# Create mock .npy files in first directory
prefix1 = 'test'
np.save(os.path.join(dir1, f'{prefix1}_garbler_arrival_rates.npy'), np.array([1.0, 2.0, 3.0]))
np.save(os.path.join(dir1, f'{prefix1}_garbler_avg_inf_times.npy'), np.array([0.5, 1.5]))
np.save(os.path.join(dir1, f'{prefix1}_garbler_avg_offline_times.npy'), np.array([0.1, 0.2, 0.3, 0.4]))
np.save(os.path.join(dir1, f'{prefix1}_garbler_avg_waiting_times.npy'), np.array([0.05]))
np.save(os.path.join(dir1, f'{prefix1}_garbler_left_to_service.npy'), np.array([10, 20]))
np.save(os.path.join(dir1, f'{prefix1}_garbler_total_num_clients.npy'), np.array([100]))

# Create mock .npy files in second directory
prefix2 = 'exp'
np.save(os.path.join(dir2, f'{prefix2}_garbler_arrival_rates.npy'), np.array([1.5, 2.5]))
np.save(os.path.join(dir2, f'{prefix2}_garbler_avg_inf_times.npy'), np.array([0.6, 1.6, 2.6]))
np.save(os.path.join(dir2, f'{prefix2}_garbler_avg_offline_times.npy'), np.array([0.15]))
np.save(os.path.join(dir2, f'{prefix2}_garbler_avg_waiting_times.npy'), np.array([0.08, 0.09]))
np.save(os.path.join(dir2, f'{prefix2}_garbler_left_to_service.npy'), np.array([15, 25, 35]))
np.save(os.path.join(dir2, f'{prefix2}_garbler_total_num_clients.npy'), np.array([150, 160]))

# Create args.json files
args_data = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10
}

with open(os.path.join(dir1, 'args.json'), 'w') as f:
    json.dump(args_data, f)

with open(os.path.join(dir2, 'args.json'), 'w') as f:
    json.dump(args_data, f)

ARGS = {
    'ds_nw': 'ds_nw',
    'base': temp_base
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_params Ran
ran on a synthesized input
kvgarimella/characterizing-private-inference/artifact/client_vs_server.py
code served (permissive licence) · get_code("cacd88da5725fa99")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary directory with args.json file
temp_dir = tempfile.mkdtemp()
args_subdir = os.path.join(temp_dir, 'test_subdir')
os.makedirs(args_subdir, exist_ok=True)

# Create a sample args.json file
sample_args = {
    'model': 'bert',
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10
}

with open(os.path.join(args_subdir, 'args.json'), 'w') as f:
    json.dump(sample_args, f)

# Define ARGS with the parameters needed for get_params
ARGS = {
    'base': temp_dir,
    'directory': '/test_subdir'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_prefix Ran
ran on a synthesized input
kvgarimella/characterizing-private-inference/artifact/client_vs_server.py
code served (permissive licence) · get_code("663c68ef5c68857f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def get_prefix(npys):
    for file in npys:
        if 'garbler' in file:
            return file.split('_')[0]

# Construct valid arguments
# The function iterates over npys and looks for strings containing 'garbler'
# It splits on '_' and returns the first part
# So npys should be a list of filenames (strings)

ARGS = {
    'npys': [
        'prefix_garbler_suffix.npy',
        'other_file.npy',
        'another_garbler_data.npy'
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In two-party machine learning prediction services, the client's goal is to query a remote server's trained machine learning model to perform neural network inference in some application domain. However, sensitive information can be obtained during this process by either the client or the server, leading to potential collection, unauthorized secondary use, and inappropriate access to personal information. These security concerns have given rise to Private Inference (PI), in which both the client's personal data and the server's trained model are kept confidential. State-of-the-art PI protocols consist of a pre-processing or offline phase and an online phase that combine several cryptographic primitives: Homomorphic Encryption (HE), Secret Sharing (SS), Garbled Circuits (GC), and Oblivious Transfer (OT). Despite the need and recent performance improvements, PI remains largely arcane today and is too slow for practical use. This paper addresses PI's shortcomings with a detailed characterization of a standard high-performance protocol to build foundational knowledge and intuition in the systems community. Our characterization pinpoints all sources of inefficiency -- compute, communication, and storage. In contrast to prior work, we consider inference request arrival rates rather than studying individual inferences in isolation and we find that the pre-processing phase cannot be ignored and is often incurred online as there is insufficient downtime to hide pre-compute latency. Finally, we leverage insights from our characterization and propose three optimizations to address the storage (Client-Garbler), computation (layer-parallel HE), and communication (wireless slot allocation) overheads. Compared to the state-of-the-art PI protocol, these optimizations provide a total PI speedup of 1.8$\times$ with the ability to sustain inference requests up to a 2.24$\times$ greater rate.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2207.07177")
get_code_for_paper("2207.07177")
have("2207.07177")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2207.07177.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2207.07177.svg)](https://syntology.ai/paper/2207.07177)

Connect an agent — have() is free.