# lucidrains/lambda-networks

Implementation of LambdaNetworks, a new approach to image recognition that reaches SOTA with less compute

Repository: https://github.com/lucidrains/lambda-networks
Canonical: https://ross.abutalabs.com/products/lambda-networks
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, deep-learning, computer-vision, attention-mechanism, attention
Last push: 2020-11-18T19:54:34+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2155, "days_push": 2114, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1528, forks 155 (observed 2026-08-28T04:04:58.570016+00:00)

## What it is
A PyTorch implementation of Lambda Networks, featuring the λ layer that models long-range interactions by transforming contexts into linear functions instead of attention. It supports both global and localized context modes and includes an unofficial TensorFlow/Keras variant.

## Use cases
- implement lambda layers in a pytorch model
- replace attention with cheaper long-range interactions
- image recognition with less compute
- experiment with lambda networks on imagenet
- use lambda layer in keras or tensorflow

## When to choose
- you want a drop-in λ layer for PyTorch image models
- you need long-range context modeling at lower compute cost than attention
- you want a minimal pip-installable research implementation

## When to avoid
- you need a maintained, production-supported library
- you need full LambdaNetworks architectures rather than just the layer
- you require the latest attention alternatives with active development

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: deep-learning, computer-vision, artificial-intelligence
- platform: python
- tags: lambda-networks, attention-mechanism, pytorch, image-recognition, research-implementation

## Member repositories
- lucidrains/lambda-networks (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:58.570016+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:31.140321+00:00, confidence not recorded.
  - readme: https://github.com/lucidrains/lambda-networks (fetched 2026-08-28T04:04:58.570016+00:00, sha f866bceaff8d)
  - registry_pypi: https://pypi.org/pypi/lambda-networks/json (fetched 2026-08-29T11:34:01.729348+00:00, sha ed7eb25b79ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
