{"notes":[{"id":"feature-fusion/nasfpn","category":"feature-fusion","legacyPath":"feature-fusion/1904-nasfpn","legacySlug":"1904-nasfpn","legacyPaths":[],"title":"NAS-FPN","subtitle":"Money Talks","author":"Z. Yuan","paperDate":"2019-04-16","publishedOn":"2024-04-06","paperTitle":"NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection","paperUrl":"https://arxiv.org/abs/1904.07392","bibliography":{"title":"NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection","authors":["Golnaz Ghiasi","Tsung-Yi Lin","Ruoming Pang","Quoc V. Le"],"url":"https://arxiv.org/abs/1904.07392","pdfUrl":"https://arxiv.org/pdf/1904.07392","codeUrl":null,"preprint":{"id":"1904.07392","submittedOn":"2019-04-16","url":"https://arxiv.org/abs/1904.07392"},"publication":{"venue":"CVPR","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1904.07392"},"citation":"@misc{featurefusionnasfpn2019,\n  title = {{NAS-FPN: Learning Scalable Feature Pyramid Architecture for Object Detection}},\n  author = {Golnaz Ghiasi and Tsung-Yi Lin and Ruoming Pang and Quoc V. Le},\n  year = {2019},\n  eprint = {1904.07392},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1904.07392}\n}\n","citationPath":"/content/papers/citations/feature-fusion/nasfpn.5cd688019361.bib"},"thumbnail":{"src":"/content/papers/assets/ec8c271631cd6ce3dc6155e5cc5ac47f4ce9ccec9a507f6c9671a39a7cb697a7.jpg","width":1024,"height":284},"locale":"en","path":"/content/papers/en/feature-fusion/nasfpn.9ece6e983a08.md","headings":[{"id":"what-is-nas","text":"What is NAS?","depth":2},{"id":"advantages","text":"Advantages","depth":3},{"id":"disadvantages","text":"Disadvantages","depth":3},{"id":"more-disadvantages","text":"More Disadvantages","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"nas-fpn-model-design","text":"NAS-FPN Model Design","depth":3},{"id":"merging-cells","text":"Merging Cells","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"feature-fusion/bifpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/detectors","relation":"comparison","topic":"Designing and searching feature pyramids"}]},{"id":"feature-fusion/bifpn","category":"feature-fusion","legacyPath":"feature-fusion/1911-bifpn","legacySlug":"1911-bifpn","legacyPaths":[],"title":"EfficientDet","subtitle":"The Power of BiFPN","author":"Z. Yuan","paperDate":"2019-11-20","publishedOn":"2024-08-15","paperTitle":"EfficientDet: Scalable and Efficient Object Detection","paperUrl":"https://arxiv.org/abs/1911.09070","bibliography":{"title":"EfficientDet: Scalable and Efficient Object Detection","authors":["Mingxing Tan","Ruoming Pang","Quoc V. Le"],"url":"https://arxiv.org/abs/1911.09070","pdfUrl":"https://arxiv.org/pdf/1911.09070","codeUrl":null,"preprint":{"id":"1911.09070","submittedOn":"2019-11-20","url":"https://arxiv.org/abs/1911.09070"},"publication":{"venue":"CVPR","year":2020,"kind":"conference","url":"https://arxiv.org/abs/1911.09070"},"citation":"@misc{featurefusionbifpn2019,\n  title = {{EfficientDet: Scalable and Efficient Object Detection}},\n  author = {Mingxing Tan and Ruoming Pang and Quoc V. Le},\n  year = {2019},\n  eprint = {1911.09070},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1911.09070}\n}\n","citationPath":"/content/papers/citations/feature-fusion/bifpn.dc7bc273ef7a.bib"},"thumbnail":{"src":"/content/papers/assets/27521b31a9957f1549825cc13abf74d8b51136759adf8d801c24f1b64f5c8d2b.jpg","width":1322,"height":500},"locale":"en","path":"/content/papers/en/feature-fusion/bifpn.5b5be9fa4810.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"model-scaling","text":"Model Scaling","depth":3},{"id":"weighted-average","text":"Weighted Average","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-on-coco","text":"Performance on COCO","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"feature-fusion/panet","relation":"background","topic":"Fusing multiscale features for detection"},{"id":"feature-fusion/nasfpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/detectors","relation":"comparison","topic":"Designing and searching feature pyramids"}]},{"id":"feature-fusion/detectors","category":"feature-fusion","legacyPath":"feature-fusion/2006-detectors","legacySlug":"2006-detectors","legacyPaths":[],"title":"DetectoRS","subtitle":"Recursive Pyramid","author":"Z. Yuan","paperDate":"2020-06-03","publishedOn":"2025-02-05","paperTitle":"DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution","paperUrl":"https://arxiv.org/abs/2006.02334","bibliography":{"title":"DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution","authors":["Siyuan Qiao","Liang-Chieh Chen","Alan Yuille"],"url":"https://arxiv.org/abs/2006.02334","pdfUrl":"https://arxiv.org/pdf/2006.02334","codeUrl":null,"preprint":{"id":"2006.02334","submittedOn":"2020-06-03","url":"https://arxiv.org/abs/2006.02334"},"publication":{"venue":"CVPR","year":2021,"kind":"conference","url":"https://doi.org/10.1109/cvpr46437.2021.01008"},"citation":"@misc{featurefusiondetectors2020,\n  title = {{DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution}},\n  author = {Siyuan Qiao and Liang-Chieh Chen and Alan Yuille},\n  year = {2020},\n  eprint = {2006.02334},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2006.02334}\n}\n","citationPath":"/content/papers/citations/feature-fusion/detectors.6b46f9ec0a09.bib"},"thumbnail":{"src":"/content/papers/assets/3eef672626e1e4898fc0f046fffe431e0f34a4b314ff13691cb96a6095a7ec9f.jpg","width":1392,"height":594},"locale":"en","path":"/content/papers/en/feature-fusion/detectors.eedc2e0ed06c.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"recursive-feature-pyramid","text":"Recursive Feature Pyramid","depth":3},{"id":"atrous-convolution","text":"Atrous Convolution","depth":3},{"id":"switchable-atrous-convolution","text":"Switchable Atrous Convolution","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-boost-from-rfp-and-sac","text":"Performance Boost from RFP and SAC","depth":3},{"id":"ablation-studies-of-rfp-and-sac","text":"Ablation Studies of RFP and SAC","depth":3},{"id":"comparison-with-other-methods","text":"Comparison with Other Methods","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"feature-fusion/nasfpn","relation":"comparison","topic":"Designing and searching feature pyramids"},{"id":"feature-fusion/bifpn","relation":"comparison","topic":"Designing and searching feature pyramids"}]}],"text":"After the introduction of FPN, feature fusion has been a hot topic of discussion. Here, we list some papers chronologically:\n\n- **2017.01** -> [DSSD: Deconvolutional single shot detector](https://arxiv.org/abs/1701.06659)\n- **2017.07** -> [RON: Reverse connection with objectness prior networks for object detection](https://arxiv.org/abs/1707.01691)\n- **2017.07** -> [Deep layer aggregation](https://arxiv.org/abs/1707.06484)\n- **2017.09** -> [StairNet: Top-down semantic aggregation for accurate one shot detection](https://arxiv.org/abs/1709.05788)\n- **2017.11** -> [Single-shot refinement neural network for object detection](https://arxiv.org/abs/1711.06897)\n- **2018.03** -> [Path Aggregation Network for Instance Segmentation](https://arxiv.org/abs/1803.01534) (This is PANet)\n- **2018.08** -> [Scale-transferable object detection](https://ieeexplore.ieee.org/document/8578160)\n- **2018.08** -> [Deep feature pyramid reconfiguration for object detection](https://arxiv.org/abs/1808.07993)\n- **2018.10** -> [Parallel feature pyramid network for object detection](https://link.springer.com/chapter/10.1007/978-3-030-01228-1_15#chapter-info)\n\nAmong these, PANet is quite well-known. The other papers also explore useful approaches to multi-scale fusion and are worth reading.\n\nSo, which one should we choose?\n\nGoogle wanted to know this too, so they proposed NAS-FPN.\n\nThe idea is: if we do not know which connections work best, let an algorithm search for them.\n\n- **Let’s conduct a massive search!**\n\n\n> [!TIP]\n> \n> Wait, isn’t this conclusion a bit off?\n> \n> Actually, this is very typical of Google.\n> \n> NASNet searched for image-classification architectures. EfficientNet also used NAS for its baseline, but combined that baseline with compound scaling in a separate study; it was not a direct output of the NASNet search.\n> \n> NAS-FPN applies architecture search to feature fusion. The “massive search” remark is a joke: a reinforcement-learning controller guides the search rather than exhaustively enumerating every architecture.\n> \n> People even use automated search in chip design. Searching for feature-fusion connections starts to sound almost ordinary by comparison.\n\n\n## What is NAS?\n\nNAS stands for Neural Architecture Search, an important research direction in deep learning. Its goal is to find useful architectures for a task within a specified search space and resource budget. Neural network architectures typically consist of multiple layers, neurons, and connections, and the design of these architectures can significantly impact model performance.\n\nTraditionally, neural network design is manually conducted by experts, requiring extensive experimentation and adjustment. This is a time-consuming process that demands professional knowledge. NAS aims to simplify this process through automation, allowing machines to explore candidate architectures, without guaranteeing a global optimum.\n\nIn NAS, a search space is defined, containing variants allowed by researcher-defined operations and connection rules, not every possible neural network. Different search strategies, such as genetic algorithms, reinforcement learning, and evolutionary algorithms, are used to automatically generate, evaluate, and select these architectures to find the best-performing one for a specific task.\n\nGenerally speaking, the advantages and disadvantages of NAS are:\n\n### Advantages\n\n- **Automation**: NAS reduces manual design of individual candidates; total time and resource use still depend on the search method.\n- **Optimization**: NAS compares candidates against task, dataset and cost objectives, potentially outperforming a manually designed baseline.\n- **Flexibility**: NAS is not limited to specific tasks or architectures and can adapt to different application scenarios, generating models that suit specific needs.\n- **Innovation**: NAS helps discover new neural network structures, potentially leading to innovative model architectures and further advancement in deep learning.\n\n### Disadvantages\n\n- **Computational Resource Consumption**: The search process may require massive computational resources, including GPUs or TPUs, and significant time, which may limit practical application.\n- **Complexity**: The size of the search space and the number of possible combinations can make the search process very complex, requiring advanced algorithms and techniques for effective searching.\n- **Data Dependency**: The best architecture found may be highly dependent on the specific dataset used for the search, with no guarantee of similar performance on other datasets.\n- **Randomness**: The search process may have a degree of randomness, leading to different results in different runs, challenging the stability of the outcomes.\n\n## More Disadvantages\n\nNAS sounds flexible and inventive, but most of us do not have the compute to build our own search system. We usually borrow the result, which immediately raises another question:\n\n- **Does my use case match the paper’s?**\n\nThe relevant conditions include training and inference data distributions, hardware and compute budget. A mismatch does not automatically make the architecture unsuitable:\n\n- **Its transfer performance needs validation.**\n\nNAS-FPN itself tests different backbones and input resolutions. This demonstrates transfer in those settings.\n\nSo, why discuss this paper? Perhaps we will be among those who can run a search one day. It shows how to define the search space and evaluation process for our own feature-fusion problem. Even without rerunning it, the discovered connections can give us design ideas.\n\n## Solving the Problem\n\n### NAS-FPN Model Design\n\n![Figure 2 from NAS-FPN: ResNet backbone, feature pyramid network and class/box prediction subnets](/content/papers/assets/ec8c271631cd6ce3dc6155e5cc5ac47f4ce9ccec9a507f6c9671a39a7cb697a7.jpg \"Ghiasi et al., NAS-FPN, Figure 2, arXiv:1904.07392v1\")\n\nThe primary goal of this study is to find a better FPN architecture. In academic terms, the initial part of a model is called the backbone, which can be replaced with structures like ResNet, MobileNet, etc.\n\nNext, the FPN part is usually called the neck, responsible for multi-scale feature connections, which is the focus here.\n\nAfter the neck comes the head, which predicts classes and bounding boxes. Engineers commonly compare and adapt these three parts.\n\nIn this study, the authors used a structure called \"RetinaNet\" as the base, with ResNet as the backbone and FPN as the neck.\n\n\n> [!TIP]\n> \n> RetinaNet introduces Focal Loss for class imbalance in dense detection. NAS-FPN uses it as the detection framework and focuses its search on the neck, allowing fusion designs to be compared under similar conditions.\n\n\n### Merging Cells\n\n![Figure 3 from NAS-FPN: a merging cell selects two feature layers, output resolution and binary operation before appending its result](/content/papers/assets/4aacdc75aea64765327ab177833212ce88a78088753d378bf7eb18115c90ef34.jpg \"Ghiasi et al., NAS-FPN, Figure 3, arXiv:1904.07392v1\")\n\nIn NAS-FPN, based on the original FPN design, the authors introduced a new concept called \"Merging Cells.\"\n\nA merging cell is a small module responsible for merging two different input feature layers into a new output feature layer. The merging process involves the following steps:\n\n1. **Select the first feature layer**: Choose a candidate, called hi. The backbone inputs are C3–C7, aligned to a common channel count; P3–P7 are the pyramid outputs. Intermediate results join the candidate pool later.\n2. **Select the second feature layer**: Choose another candidate, called hj, without replacement within this cell.\n3. **Determine the output feature size**: Choose a resolution size, which will be the size of the new feature layer.\n4. **Select the merging operation**: Use a specific mathematical operation (such as addition or global pooling) to merge hi and hj.\n\nIn step 4, as shown below, two binary operations were designed in the search space: sum and global pooling. In the global-pooling operation, one input is pooled to form a channel gate that modulates the other input before fusion. These two fusion operations introduce no trainable parameters, but the following convolution and BatchNorm do.\n\nIf hi and hj differ in resolution, nearest-neighbor upsampling or max pooling aligns them before fusion. The new feature layer then passes through ReLU, a 3×3 convolution and BatchNorm. The cells eventually produce P3–P7; because input and output scales match, the entire pyramid network can be stacked.\n\n## Discussion\n\nAn RNN controller is trained with PPO, using validation AP as the reward. The proxy task uses ResNet-10, 512×512 inputs and 10 training epochs; 100 TPU workers evaluate candidates in parallel.\n\nThe number of newly sampled unique architectures levels off after roughly 8,000 controller steps. These are controller updates, not the detector’s training steps.\n\nThe authors select the highest **proxy-task validation AP** among sampled architectures for full training and evaluation.\n\nThe selected architecture was first sampled at around controller step 8,000 and was sampled repeatedly afterwards.\n\nThen, the authors presented the FPN architecture obtained through NAS, as shown below:\n\n![Crop of paper Figure 7(f): bidirectional cross-scale links in the selected NAS-FPN, with 16.8 AP as proxy-task reward](/content/papers/assets/779065714469af4ab0fba0d3ee56580fc633abbf71d4d6afa9ebaa80be9c4479.jpg \"Ghiasi et al., NAS-FPN, Figure 7(f) crop, arXiv:1904.07392v1; not final COCO test-dev AP\")\n\nThis diagram looks complex, giving a feeling of being impressive but incomprehensible.\n\nBut it isn’t. Let’s annotate it:\n\n![This note annotates a crop of paper Figure 7(f) with arrows, resolution and input/output marks; added C1–C5 labels are not the paper's input-level names](/content/papers/assets/27915f0f0a75796fad13d3d2c5476a6079da3e0060a4230649d9a2634c1e212e.jpg)\n\nThe annotation helps us follow the connections. Its green “C1–C5” labels were added by this note; the actual paper uses **C3–C7 as inputs and P3–P7 as outputs**. Those labels are not model specifications.\n\nThe paper labels (a) as the baseline FPN. This diagram expands feature levels and operations; the connections and resolutions matter more than counting nodes and calling it a “pseudo FPN.”\n\nIn full Figure 7, the **7.5, 9.9, 15.0, 16.0 and 16.8 AP** values from (b) to (f) are **ResNet-10 proxy-task search rewards**, not final COCO test-dev detector scores. Higher-reward architectures contain bidirectional cross-scale connections, echoing part of PANet’s design intuition:\n\n- High-level, low-resolution features flow toward higher-resolution levels.\n- Higher-resolution features also flow toward lower-resolution levels.\n- The details differ from PANet.\n\n![Paper Figure 7: baseline FPN and five searched architectures with proxy-task AP rewards](/content/papers/assets/293db46af6269df9a3f165135c3bf9c81a1d562fce621b9649455f1177025d83.jpg \"Ghiasi et al., NAS-FPN, Figure 7, arXiv:1904.07392v1\")\n\nFor fully trained COCO test-dev results, Table 1 gives **37.0 AP/37.5 ms** for FPN and **39.9 AP/56.1 ms** for seven-layer NAS-FPN, both with ResNet-50 and 640×640 inputs. Accuracy rises with latency. The **48.3 AP** configuration instead uses AmoebaNet, seven NAS-FPN layers and DropBlock; it must not be confused with the 16.8 proxy reward.\n\n## Conclusion\n\nEarlier feature-fusion architectures were mostly designed by hand and tested experimentally. We can accept a conclusion based on experiments without a complete theory, but how do we decide whether those experiments explored enough designs?\n\nNAS-FPN answers with a defined search space and an unusually large compute budget. Its selected connections include bidirectional paths reminiscent of PANet, though the connection details differ. That resemblance supports looking more closely at PANet's design idea.\n\nMoney can make a search much bigger. We still need to define the right problem and test whether its result works for us.\n","imageSizes":{"/content/papers/assets/ec8c271631cd6ce3dc6155e5cc5ac47f4ce9ccec9a507f6c9671a39a7cb697a7.jpg":{"width":1024,"height":284},"/content/papers/assets/4aacdc75aea64765327ab177833212ce88a78088753d378bf7eb18115c90ef34.jpg":{"width":1024,"height":335},"/content/papers/assets/779065714469af4ab0fba0d3ee56580fc633abbf71d4d6afa9ebaa80be9c4479.jpg":{"width":800,"height":602},"/content/papers/assets/27915f0f0a75796fad13d3d2c5476a6079da3e0060a4230649d9a2634c1e212e.jpg":{"width":1024,"height":523},"/content/papers/assets/293db46af6269df9a3f165135c3bf9c81a1d562fce621b9649455f1177025d83.jpg":{"width":1024,"height":472}}}
