SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.12229 · 2025

Ultra-Low Bitrate Perceptual Image Compression with Shallow Encoder

Dong Liu, Chang Chen, Tianyu Zhang, Encoder

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2512.12229.json · badge: /api/ran/2512.12229.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
LuizScarlet/AEIC canonical (classifier label)
classifier basis: census
8 ran · 5 no recorded run
FunctionStatusWhere it lives
MyUNet2DConditionModel_SD_forward_dual Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LuizScarlet/AEIC/src/custom_forward.py
code served (permissive licence) · get_code("32256b2c18373663")
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 tuple. 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 torch.nn as nn

torch.manual_seed(0)

class SimpleBlock(nn.Module):
    def __init__(self, in_channels, out_channels):
        super().__init__()
        self.conv = nn.Conv2d(in_channels, out_channels, 3, padding=1)
    
    def forward(self, x, skip):
        x = self.conv(x)
        skip.append(x)
        return x

class MidBlock(nn.Module):
    def __init__(self, channels):
        super().__init__()
        self.conv = nn.Conv2d(channels, channels, 3, padding=1)
    
    def forward(self, x):
        return self.conv(x)

class MyUNet2DConditionModel_SD(nn.Module):
    def __init__(self):
        super().__init__()
        self.teacher_conv_in = nn.Conv2d(4, 8, 3, padding=1)
        self.student_conv_in = nn.Conv2d(4, 8, 3, padding=1)
        
        self.down_blocks = nn.ModuleList([
            SimpleBlock(8, 16),
            SimpleBlock(16, 32),
        ])
        
        self.mid_block = MidBlock(32)
        
        self.up_blocks = nn.ModuleList([
            SimpleBlock(32, 16),
            SimpleBlock(16, 8),
        ])
        
        self.conv_norm_out = nn.GroupNorm(1, 8)
        self.conv_act = nn.SiLU()
        
        self.teacher_conv_out = nn.Conv2d(8, 4, 3, padding=1)
        self.student_conv_out = nn.Conv2d(8, 4, 3, padding=1)
    
    def forward(self, x, mode):
        return self.MyUNet2DConditionModel_SD_forward_dual(x, mode)
    
    def MyUNet2DConditionModel_SD_forward_dual(self, x, mode):
        if mode == 'teacher':
            features = [x]
            x = self.teacher_conv_in(x)
            skip = [x]
            for block in self.down_blocks:
                x = block(x, skip)
                features.append(x)
            x = self.mid_block(x)
            features.append(x)
            for block in self.up_blocks:
                x = block(x, skip)
                features.append(x)
            x = self.conv_norm_out(x)
            x = self.conv_act(x)
            x = self.teacher_conv_out(x)
            features.append(x)
            return (x, features)
        else:
            features = [x]
            x = self.student_conv_in(x)
            skip = [x]
            for block in self.down_blocks:
                x = block(x, skip)
                features.append(x)
            x = self.mid_block(x)
            features.append(x)
            for block in self.up_blocks:
                x = block(x, skip)
                features.append(x)
            x = self.conv_norm_out(x)
            x = self.conv_act(x)
            x = self.student_conv_out(x)
            features.append(x)
            return (x, features)

model = MyUNet2DConditionModel_SD()
x = torch.randn(2, 4, 8, 8)
mode = 'teacher'

ARGS = {
    'self': model,
    'x': x,
    'mode': mode,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
adain_color_fix_quant Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LuizScarlet/AEIC/src/color_fix.py
code served (permissive licence) · get_code("6c80cf7b506f0b4a")
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 Image. 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
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create small PIL images for testing
# target image: 4x3 RGB
target_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
target_image = Image.fromarray(target_array.transpose(1, 2, 0), mode='RGB')

# source image: 4x3 RGB
source_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
source_image = Image.fromarray(source_array.transpose(1, 2, 0), mode='RGB')

ARGS = {
    'target': target_image,
    'source': source_image,
    'bits': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
adaptive_instance_normalization_quant Ran
ran; our contract draft was wrong, not the code
LuizScarlet/AEIC/src/color_fix.py
code served (permissive licence) · get_code("c4766dcaf028d9fb")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
from torch import Tensor

torch.manual_seed(0)

# Create small 4D tensors for content and style features
# Shape: (batch=2, channels=4, height=3, width=3)
content_feat = torch.randn(2, 4, 3, 3)
style_feat = torch.randn(2, 4, 3, 3)

# Define bits parameter
bits = 10

ARGS = {
    "content_feat": content_feat,
    "style_feat": style_feat,
    "bits": bits,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
calc_mean_std_quant Ran
ran; our contract draft was wrong, not the code
LuizScarlet/AEIC/src/color_fix.py
code served (permissive licence) · get_code("e496e59dad8f43b1")
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 tuple, ndim 5, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# Create a 4D tensor with shape (batch=2, channels=4, height=3, width=5)
feat = torch.randn(2, 4, 3, 5)

ARGS = {
    'feat': feat,
    'eps': 1e-05,
    'bits': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
lower_bound_bwd Ran
ran; our contract draft was wrong, not the code
LuizScarlet/AEIC/src/codec/base_entropy_coder.py
code served (permissive licence) · get_code("07f8484bf7fe9b22")
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 tuple. 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

torch.manual_seed(0)

# Create small tensors for the function parameters
x = torch.randn(2, 4)  # Input tensor
bound = torch.randn(2, 4)  # Bound tensor for comparison
grad_output = torch.randn(2, 4)  # Gradient output tensor

ARGS = {
    "x": x,
    "bound": bound,
    "grad_output": grad_output,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
lower_bound_fwd Ran
ran; our contract draft was wrong, not the code
LuizScarlet/AEIC/src/codec/base_entropy_coder.py
code served (permissive licence) · get_code("9d2139d32f9bca32")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
from torch import Tensor

torch.manual_seed(0)

# Create small tensors for testing lower_bound_fwd
x = torch.randn(2, 4)
bound = torch.randn(2, 4)

ARGS = {
    "x": x,
    "bound": bound,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
parse_args Ran
ran; our contract draft was wrong, not the code
LuizScarlet/AEIC/src/evaluate.py
code served (permissive licence) · get_code("0320a3ea81d98dcf")
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 Namespace. 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 argparse

ARGS = {
    'argv': [
        '--recon_dir', '/tmp/recon',
        '--gt_dir', '/tmp/gt'
    ]
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
preprocess_image Ran
ran, honoured the contract we drafted
LuizScarlet/AEIC/src/compress.py
code served (permissive licence) · get_code("52310727a35e4fb5")
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 Tensor, ndim 3, dtype family float, shape (3, 32, 32) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 torch.nn as nn
from torchvision import transforms
from PIL import Image
import io

# Create a small test image and save it to a bytes buffer
# We'll create a simple RGB image
img_array = torch.randint(0, 256, (32, 32, 3), dtype=torch.uint8).numpy()
pil_image = Image.fromarray(img_array, mode='RGB')

# Save to a temporary file-like object, but we need an actual path
# Since we can't do file I/O, we'll create a minimal image file in memory
# and use PIL's ability to work with it
import tempfile
import os

# Create a temporary image file
temp_dir = tempfile.gettempdir()
image_path = os.path.join(temp_dir, 'test_image_temp.png')
pil_image.save(image_path)

# Create a transform that PIL Image expects
# This should be a torchvision.transforms composition or similar callable
transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
])

ARGS = {
    'image_path': image_path,
    'transform': transform
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 32, 32) — shape (3, 32, 32) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
MyUNet2DConditionModel_SD_forward Not yet run
unverified (harvested, no recorded run)
LuizScarlet/AEIC/src/custom_forward.py
code served (permissive licence) · get_code("3b0fdeaa6e5c6899")
How it ran

no invocation recorded.

compress_one_image Not yet run
unverified (harvested, no recorded run)
LuizScarlet/AEIC/src/compress.py
code served (permissive licence) · get_code("6ae37fdc7a7f9d9f")
How it ran

no invocation recorded.

decompress_one_image Not yet run
unverified (harvested, no recorded run)
LuizScarlet/AEIC/src/compress.py
code served (permissive licence) · get_code("15bf6175a2165b88")
How it ran

no invocation recorded.

my_lora_fwd Not yet run
unverified (harvested, no recorded run)
LuizScarlet/AEIC/src/custom_forward.py
code served (permissive licence) · get_code("68909cb226bde7c2")
How it ran

no invocation recorded.

pmf_to_quantized_cdf Not yet run
unverified (harvested, no recorded run)
LuizScarlet/AEIC/src/codec/base_entropy_coder.py
code served (permissive licence) · get_code("5a2be7a263fac600")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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.

FunctionAlso present inEarliest-datedOthers named
lower_bound_bwd 4 other papers
4 dated earlier
aaai_19890 (2022 (year only))
OoDHDR-Codec: Out-of-Distribution Generalization for HDR Image Compression
2203.08450 (2022-03)
The Devil Is in the Details: Window-based Attention for Image Compression
2403.00628 (2024-03)
Region-Adaptive Transform with Segmentation Prior for Image Compression
and 1 more not named here
lower_bound_fwd 4 other papers
4 dated earlier
aaai_19890 (2022 (year only))
OoDHDR-Codec: Out-of-Distribution Generalization for HDR Image Compression
2203.08450 (2022-03)
The Devil Is in the Details: Window-based Attention for Image Compression
2403.00628 (2024-03)
Region-Adaptive Transform with Segmentation Prior for Image Compression
and 1 more not named here

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

Ultra-low bitrate image compression (below 0.05 bits per pixel) is increasingly critical for bandwidth-constrained and computation-limited encoding scenarios such as edge devices. Existing frameworks typically rely on large pretrained encoders (e.g., VAEs or tokenizer-based models) and perform transform coding within their generative latent space. While these approaches achieve impressive perceptual fidelity, their reliance on heavy encoder networks makes them unsuitable for deployment on weak sender devices. In this work, we explore the feasibility of applying shallow encoders for ultra-low bitrate compression and propose a novel Asymmetric Extreme Image Compression (AEIC) framework that pursues simultaneously encoding simplicity and decoding quality. Specifically, AEIC employs moderate or even shallow encoder networks, while leveraging an one-step diffusion decoder to maintain highfidelity and high-realism reconstructions under extreme bitrates. To further enhance the efficiency of shallow encoders, we design a dual-side feature distillation scheme that transfers knowledge from AEIC with moderate encoders to its shallow encoder variants. Experiments show that AEIC not only outperforms existing methods on ratedistortion-perception performance at ultra-low bitrates, but also delivers exceptional encoding efficiency for 35.8 FPS on 1080P images, while maintaining competitive decoding speed compared to existing methods. Code is available at https://github.com/LuizScarlet/AEIC.

For agents

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

get_harvested_code_for_paper("2512.12229")
get_code_for_paper("2512.12229")
have("2512.12229")

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

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

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

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

Connect an agent — have() is free.