Skip to main content

Implementation of the Pseudo-Projector, application of multigrid methods to deep neural networks, by Vitaly Bulgakov

Project description

Pseudo-projector

Implementation of the pseudo projector proposed by Vitaly Bulgakov during his work applying transformers to medical records at Mass General Brigham Hospital

Install

$ pip install pseudo-projector

Usage

import torch
from pseudo_projector import PseudoProjector

proj = PseudoProjector(dim = 64, dim_lowrank = 16)

feats = torch.randn(1, 8, 1024, 64) # any number of preceding dimensions

out = proj(feats)

assert feats.shape == out.shape

With the learned blending of original features with the coarsened ones

import torch
from pseudo_projector import PseudoProjectorWithResidual

proj = PseudoProjectorWithResidual(dim = 64, dim_lowrank = 16, learned_alpha = True)

feats = torch.randn(1, 8, 1024, 64) # any number of preceding dimensions

out = proj(feats)

assert feats.shape == out.shape

Citations

@misc{bulgakov2026correctiontransformerbasedmodelssmoothing,
    title   = {Correction of Transformer-Based Models with Smoothing Pseudo-Projector},
    author  = {Vitaly Bulgakov},
    year    = {2026},
    eprint  = {2603.09815},
    archivePrefix = {arXiv},
    primaryClass = {cs.LG},
    url     = {https://arxiv.org/abs/2603.09815},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pseudo_projector-0.0.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pseudo_projector-0.0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pseudo_projector-0.0.4.tar.gz.

File metadata

  • Download URL: pseudo_projector-0.0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for pseudo_projector-0.0.4.tar.gz
Algorithm Hash digest
SHA256 51442166dbcad2a89fabf6897e0f181799f298243fb812d7372a65682e8aec4e
MD5 6fdccbb1d735c855bc21b9ba9bfa7b9f
BLAKE2b-256 88ae5936e1b64b0d24c35ace8083c964ad62e11908078b6a6430c1eb3c2b93a9

See more details on using hashes here.

File details

Details for the file pseudo_projector-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pseudo_projector-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d60e30656cf894282cf50a892fa00fcfd9f28bd45983072e5bc31d727d65b973
MD5 c3fc2fd8a6888fe1fea4b7a96fced93c
BLAKE2b-256 88d6cf8fcfd50d1b0e466da72ccb77f4006e480527cd04b9aa6aead40479b48a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page