Skip to main content

GPU Accelerated Feature Interaction Mining Engine

Project description

GAFIME: GPU-Accelerated Feature Interaction Mining Engine 🚀

PyPI version Python Versions License

GAFIME is a high-performance computing engine engineered to eliminate the biggest bottleneck in modern machine learning workflows: Feature Interaction Discovery.

While most data science tools prioritize ease-of-use over execution efficiency, GAFIME treats feature engineering as a low-level systems problem. By combining C++ optimization, Rust memory-safety pipelines, and cross-platform native bindings (CUDA/Metal), GAFIME bridges the gap between high-level data science and the raw power of modern hardware architectures.

📦 Installation

GAFIME ships natively compiled wheel binaries for Windows, macOS (Apple Silicon), and Linux heavily optimized for performance out-of-the-box.

Basic Install (Engine Only):

pip install gafime

Data Science Install (Includes Scikit-Learn Wrapper):

pip install gafime[sklearn]

⚡ Quickstart: The Interactive Tutorial

The fastest way to understand GAFIME's speed is to try our built-in interactive tutorial generator. Running this command will generate a pre-configured gafime_tutorial.ipynb Jupyter Notebook in your current directory with dummy feature data to instantly evaluate against:

gafime --init

🧩 Scikit-Learn Pipeline Integration

You don't need to rewrite your data pipelines to use GAFIME. By importing the GafimeSelector, you can inject GPU-accelerated feature discovery natively into sklearn.pipeline.Pipeline or GridSearchCV:

import numpy as np
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from gafime.sklearn import GafimeSelector

# Define dummy data
X_train = np.random.randn(1000, 50).astype(np.float32)
y_train = np.random.randint(0, 2, size=1000).astype(np.float32)

# Create a pipeline that automatically discovers the Top 5 best Feature Interactions
# Evaluated instantly against the GPU logic and appends them to your training dataset
pipe = Pipeline([
    ('interaction_miner', GafimeSelector(k=5, backend='auto', operator='multiply')),
    ('classifier', LogisticRegression())
])

pipe.fit(X_train, y_train)

Discrete Function Search in v0.4.0

GAFIME v0.4.0 adds engine-level discrete function representations for threshold and region-style signals that pure continuous pair mining can miss.

from gafime import ComputeBudget, EngineConfig, GafimeEngine

config = EngineConfig(
    metric_names=("pearson",),
    enable_discrete_functions=True,
    discrete_mode="soft",
    discrete_ranking="split_aware",
    budget=ComputeBudget(
        max_discrete_candidates=100_000,
        max_thresholds_per_feature=9,
        max_intervals_per_feature=12,
        max_feature_pairs_for_rectangles=500,
        top_k_features_for_discrete=50,
    ),
)

report = GafimeEngine(config).analyze(X, y, feature_names=feature_names)

Implemented families include soft thresholds, soft intervals, value-gated thresholds, soft rectangles, and value-in-rectangle candidates. Discrete candidates use the same metric_names as the rest of the engine for reported metrics. Their default report ordering uses discrete_ranking="split_aware", which combines mask mutual information, soft variance reduction, and residual gain scores; set discrete_ranking="metric" to rank by the selected report metrics instead.

CUDA and Metal GPU paths use soft/vectorized discrete functions only. Hard discrete mode is supported only by CPU/NumPy paths and is rejected on GPU.

Rust helper APIs are exposed through:

from gafime import subfunctions

Prefer subfunctions in user-facing code rather than importing the Rust extension name directly.

Cache-Local GPU Scheduling

GAFIME uses Rust-side cache-local launch ordering so adjacent GPU equations reuse feature columns naturally. This does not reserve or pin hardware L2 cache; CUDA L2 persistence APIs are not used.

The current local NCU profile for the discrete CUDA soft kernel showed the effect of this ordering: 4.93 ms launch duration, 98.45% L2 hit rate, 3.05% DRAM throughput, 39 registers/thread, 0 spills, and 100% branch efficiency.

🌌 Why GAFIME? The Performance Ceiling

In the current data science landscape, mining interaction data (like checking Feature X * Feature Y against the target) is painfully slow on CPUs or inefficiently memory-managed on GPUs. GAFIME achieves:

  1. Hardware-Bound Execution: GAFIME targets physical memory bandwidth limits, minimizing the overhead of standard GPU python workflows. You hit the system's ceiling.
  2. Zero-Overhead Scaling: Utilizing Rust's FFI capabilities on top of optimized CUDA C++, GAFIME bypasses the Python Global Interpreter Lock (GIL) ensuring every clock cycle executes pure feature logic.
  3. Cross-Platform Scalability: Whether you're on a MacBook executing Metal fallback logic via Rust, or an RTX workstation targeting CUDA registers, GAFIME auto-discovers and optimizes for your hardware at runtime.

Caching and Branch-less Operations

GAFIME's specialized memory layout and cache-local launch ordering keep tabular feature access predictable. GPU discrete feature engineering uses branchless soft gates instead of hard threshold branches.

🛠️ Technology Stack

  • Core Engine: C++ / CUDA (Performance-critical computation paths) and Metal (Apple Silicon native acceleration)
  • Safety Pipeline & Schedulers: Rust (Memory safe FFI interface scheduling)
  • Data Science Interfacing: Python (Polars / Numpy bindings seamlessly communicating across boundaries)

✅ For being honest

-> Current release work is targeting v0.4.0.

-> The project is developed with the help of current frontier SOTA models such as Gemini 3.1 Pro (high reasoning effort) and Claude Opus 4.6 (high).

🤝 If you want

You could collaborate with me via using email to communicate 🥰

Email: hamzausta2222@gmail.com


Contributing and Advanced Usage

Looking to expand the engine metrics or compile natively yourself? Please see our detailed references:

GAFIME was conceptualized and engineered for extreme high-frequency feature permutations in complex categorical environments like Banking models.

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

gafime-0.4.0.tar.gz (153.1 kB view details)

Uploaded Source

Built Distributions

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

gafime-0.4.0-cp314-cp314-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.14Windows x86-64

gafime-0.4.0-cp314-cp314-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

gafime-0.4.0-cp314-cp314-macosx_11_0_arm64.whl (582.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

gafime-0.4.0-cp313-cp313-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.13Windows x86-64

gafime-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

gafime-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (582.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

gafime-0.4.0-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

gafime-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

gafime-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (582.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

gafime-0.4.0-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

gafime-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

gafime-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (581.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gafime-0.4.0-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

gafime-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

gafime-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (582.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file gafime-0.4.0.tar.gz.

File metadata

  • Download URL: gafime-0.4.0.tar.gz
  • Upload date:
  • Size: 153.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9cd3edc87ca3b78461918f2bdee2f73d2b134921450896798ceaf176e35b4ed3
MD5 05c15d40bfa0de57fd8fff8b3d35b7b5
BLAKE2b-256 bafe93121da1a329d39359305c8a3c17ec23176981270e44186dc2b138827c8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0.tar.gz:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: gafime-0.4.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5f5ba732721b5a03340cc5a849aba74e5eb6dc31851b55d3fdc98d793af2b808
MD5 0040613dd9a77ca1b979d7fef5daad90
BLAKE2b-256 f8c1d1febebc2d80ceeba1e8eb4e91f684426220542a3080407aa305bffd56ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp314-cp314-win_amd64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26ec633694c6409af5d7e9ed8c8d12c5a971d63ca7193e4377bd9f6435246935
MD5 02ac48b6dfa60cb5e4503744ff383f73
BLAKE2b-256 49ffa9304a49cab162f06cdb0792d304669ca9bd2b0742ed10197aef7df29147

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 afa01b6657b96cad503f25191c98685c0f507ccc525a30ef319660cd4b410ea4
MD5 657e4a8379b88b30192abbb297282c84
BLAKE2b-256 151ebfbc75f27cbee2bb3ff35ab418ce0cd4cc8bec0b1b10c79c040495fd9f47

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: gafime-0.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 422ae26049f91470ce97f9a07311baa3c55ad81fc784b338ff80db4657d775df
MD5 06ee1530d9a3c39fd86fba2e006db2fa
BLAKE2b-256 818e54ba5599968cb095f811a2ad971a6dd3964f1068cc73b0557ccec06690c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp313-cp313-win_amd64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d540874d7df0e733bd5c3c664cae87e40f00e1bc68c29dd26ae7bb45750ba55e
MD5 c3a808ca15e2e78149aba7e4e3dbd896
BLAKE2b-256 ea6f7304f215e72cafa2ce4d71fd04f3b00d632c9687a669c08b866063e5c159

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 131971a92236d78dac18eab6c272a56a798c5d36df3bad1f6a7026b826c60cd5
MD5 ef1d2d6754f43f4695e739f54ab8860b
BLAKE2b-256 0128c4018d3f2452d097eb813117fd677520c44b090404a26f8bb73c331e1696

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gafime-0.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 05b2744641d1408baff3840af8bf245fd1edf9338dfbc91aae5c6eac230041a0
MD5 4fd5a0899b473954b689a088895e91d1
BLAKE2b-256 0a28117980769bf7beac7aedf18dedbe9025757a0124290d3bef62308008b8d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp312-cp312-win_amd64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 505814637d54431342e9581d30303210e2df62c59a2c9f3a63f1b9de9b5de9c9
MD5 4b40f8e9aa6ee78553f803e038b2f9c1
BLAKE2b-256 6b731db3b6818edbded1863191be02ee9c895ecbca484e4ca2b35e81876b4271

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0fda450e0608a9ad44618ab969569a9c7892705f7e424576b3d1bfd4be773025
MD5 b5af9151b280fe21514df4a8fce41fab
BLAKE2b-256 fcccb1eb02f0231198b19307d7e946ebc4255671c740932ba954c3b2bdedf9c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gafime-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 127e86c7be6546ed65cc5b09142591892d978bb4ba6db42a684c511b830ac523
MD5 39fa9b11650b9db0582e93421a0e1643
BLAKE2b-256 df358466aea64313101b0e4fb398dd9e31648d9339396a2d56bbdbd1c23535e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 718e964166c11dd4573e303c29ebd533c4a7c2f652b969d518dbfc43cf78284b
MD5 8a6668793149e1fbd6e994108c3f6760
BLAKE2b-256 3db0ddcac69980ad30fbaa0273b5cad64792fa877f2ee613ae98ca914d958f3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d25950bbeab711c755600e4ea76cf18be3320da2fc5b62dafd4fe7fa28a50a7
MD5 2b27a977fc8e8a2e5daa7966c0a1b778
BLAKE2b-256 1f681424ac9a65b021cde009d5247afb853f47e8496a9ba5fe4e6a58b71b019c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gafime-0.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gafime-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a53d4bd518ddfc332644076b63d39011f0aad4a1224b8de5ecd52a8280c44b56
MD5 1c8c2976f1ed7c2cb815ab326ca0ce0b
BLAKE2b-256 bce8bbfcee25e49fbcd3fb14694f4bf20443a1c5189f93887ab95d954064ef5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a46ee0210268e327e5357fad356adebf8bc89cae2d5bf349d08e77e43af8f4e8
MD5 148920d84fbd641e771fed9da142e7a1
BLAKE2b-256 a0d9b49f05ccbdc9dd1467c04ff034422ad05b5d3882f5a7910ee9415d817c82

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gafime-0.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gafime-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b12053414b60ea6b1898720f97ae2c48f90d73c6413b17c17dacd8b076944858
MD5 bbee9246597e906912b3aad3908f4f24
BLAKE2b-256 4428af7b3bcac35159d6093b492c656b0cb48216881b103d301071ecfdea28fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for gafime-0.4.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on onlyxItachi/GAFIME

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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