# CDDOD: Cross-Domain Document Object Detection

> Research notes on CDDOD, a cross-domain document object detection framework that introduces a benchmark suite of three PDF datasets and an FPN-based alignment method with feature pyramid, region, and rendering layer modules.

- Authors: Hunter Heidenreich
- Published: 2026-03-14
- Paper: Preprint (arXiv) <https://arxiv.org/abs/2003.13197>
- Paper: Published (CVPR 2020) <https://doi.org/10.1109/CVPR42600.2020.01293>
- Code: CDDOD <https://github.com/kailigo/cddod>
- Dataset: CDDOD Benchmark (PubMed + Chn) <https://github.com/kailigo/cddod>
- Source: Bevaya Labs, <https://labs.bevaya.ai/>

---


## TL;DR

This paper formalizes cross-domain document object detection (DOD) as a task, introduces a benchmark suite of three PDF document datasets (PubMed, Chn, Legal), and proposes an FPN-based method with three adversarial alignment modules (Feature Pyramid Alignment, Region Alignment, and Rendering Layer Alignment) that leverage PDF rendering layers as domain-consistent supervision signals.

## What kind of paper is this?

**Dominant:** $\Psi\_{\text{Method}}$ : The headline novelty is the three-module alignment framework for cross-domain DOD. The paper dedicates the most space to describing the FPA, RA, and RLA modules and includes ablation studies isolating each module's contribution. SOTA-style comparisons across six cross-domain transfer directions demonstrate the method's performance across transfer directions.

**Secondary:** $\Psi\_{\text{Resource}}$ : The paper establishes a benchmark suite of three document datasets (PubMed, Chn, Legal) with page images, bounding box annotations, raw PDF files, and PDF rendering layers. Two of three datasets (PubMed and Chn) are publicly released.

## What is the motivation?

Document object detection requires large labeled training sets, but documents vary widely in layout, language, and genre. Constructing a comprehensive labeled dataset for every document domain is infeasible. The authors identify two key gaps:

1. **No cross-domain DOD benchmark exists.** Existing DOD datasets annotate only certain object types (tables, formulas) and do not provide auxiliary data like PDF rendering layers that could help bridge domain gaps.
2. **Cross-domain object detection methods from natural images are suboptimal for documents.** Document objects have extreme variance in aspect ratio and scale (a page number vs. a full-page table), and documents contain modular elements where context provides limited inpainting cues, unlike natural scenes.

The paper argues that adapting cross-domain techniques from natural image detection requires both document-specific data assets and document-specific alignment strategies.

## What is the novelty?

### Benchmark Suite

Three datasets sharing the same 5-class label space (text, list, heading, table, figure):

| Dataset | Pages | Domain | Language | Annotation | Source |
| :--- | :--- | :--- | :--- | :--- | :--- |
| **PubMed** | 12,871 | Scientific journals | English | Auto (from PubLayNet) | PDF |
| **Chn** | 8,005 | Synthesized documents | Chinese | Auto (from tags) | PDF |
| **Legal** | 19,355 | Legal reports | English | Human | PDF |

Each dataset includes page images, bounding box annotations, raw PDF files, and PDF rendering layers (text, vector, raster). The authors re-processed PubLayNet's "list" annotations, splitting whole-list bounding boxes into individual items.

### Cross-Domain DOD Method

Built on FPN with ResNet-101 backbone, the method introduces three adversarial alignment modules:

**Feature Pyramid Alignment (FPA):** Four binary domain classifiers $\\{D\_1, D\_2, D\_3, D\_4\\}$ operating on feature pyramid layers $\\{P\_1, P\_2, P\_3, P\_4\\}$. Each classifier predicts whether a pixel belongs to the source or target domain, trained adversarially via gradient reversal:

$$L\_p = -\frac{1}{4W^sH^s}\sum\_{i=1}^{4}\sum\_{w=1}^{W^s}\sum\_{h=1}^{H^s}\log(D\_i(P\_{i,w,h}^s)) - \frac{1}{4W^tH^t}\sum\_{i=1}^{4}\sum\_{w=1}^{W^t}\sum\_{h=1}^{H^t}\log(1 - D\_i(P\_{i,w,h}^t))$$

The authors note that since each pyramid layer mixes high- and low-level features, aligning pyramids jointly addresses both semantic levels simultaneously, unlike prior methods that align them separately.

**Region Alignment (RA):** A focal-loss-weighted binary domain classifier on region proposals. Unlike prior work that treats all proposals equally, the focal loss focuses on hard-to-align proposals:

$$L\_r = -\frac{1}{R}\sum\_{i=1}^{R}(1 - D\_r(r\_i^s))^\gamma \log(D\_r(r\_i^s)) - \frac{1}{R}\sum\_{i=1}^{R}(D\_r(r\_i^t))^\gamma \log(1 - D\_r(r\_i^t))$$

with $\gamma = 5.0$.

**Rendering Layer Alignment (RLA):** A DeepLab-V2-style segmentation network that predicts pixel-level rendering layer masks (background, text, raster; $C = 3$) from the FPN feature map $C\_4$. Since rendering layers are available for both source and target PDFs, this auxiliary segmentation task provides domain-consistent supervision. The vector layer is merged into background because vector drawings are too thin to carry reliable semantics.

The total training loss is:

$$\mathcal{L} = \mathcal{L}\_{det}^s + \lambda\_1 \mathcal{L}\_p + \lambda\_2 \mathcal{L}\_r + \lambda\_3 \mathcal{L}\_s$$

At inference, all alignment modules are removed and only the standard FPN detector remains.

## What experiments were performed?

### Cross-Domain Transfer Directions

Six transfer experiments across three datasets (each used as both source and target):

- Legal $\leftrightarrow$ Chn (cross-lingual)
- Chn $\leftrightarrow$ PubMed (cross-lingual)
- Legal $\leftrightarrow$ PubMed (cross-category, both English)

### Baselines

- **FRCNN (source-only):** Faster R-CNN trained only on source labels, no adaptation.
- **FPN (source-only):** Feature Pyramid Network trained only on source labels.
- **SWDA:** Strong-Weak Distribution Alignment (Saito et al., CVPR 2019), a cross-domain detector for natural images.
- **Oracle:** FPN trained with labeled target data (upper bound).

### Ablation Study (Legal $\rightarrow$ PubMed)

| Configuration | mAP |
| :--- | :--- |
| FPN (source-only) | 64.9 |
| FPN + FPA | 66.5 |
| FPN + FPA + RA | 68.6 |
| FPN + FPA + RA + RLA | **70.7** |

RLA was also tested as a plug-in on SWDA, boosting its mAP from 65.3 to 68.7 (+3.4).

### Natural Image Transfer

Without RLA (which requires PDF data), FPA + RA were tested on Kitti $\leftrightarrow$ Cityscape car detection, outperforming SWDA (73.3 vs. 70.6 on Cityscape $\rightarrow$ Kitti).

### Metric

Mean Average Precision (mAP) at IoU threshold 0.5.

## What are the outcomes/conclusions?

### Key results

- The full method (FPA + RA + RLA) consistently outperforms all baselines across all six transfer directions.
- Best improvements appear on Legal $\rightarrow$ PubMed (+5.8 mAP over FPN baseline) and PubMed $\rightarrow$ Chn (+20.5 mAP over FPN baseline).
- RLA is a modular component that improves any detector when PDF rendering layers are available.
- PubMed-as-source transfers show the largest domain adaptation gains, likely because PubMed's homogeneous formatting (scientific journals with similar templates) limits its diversity, making the source-only model especially brittle on out-of-domain targets.

### Limitations

- **Large oracle gap persists.** The best adapted results (e.g., 70.7 on Legal $\rightarrow$ PubMed) remain well below oracle performance (86.1), indicating domain shift is far from fully addressed.
- **RLA requires PDF access.** The rendering layer module only works when raw PDFs are available for both domains, which excludes scanned or camera-captured documents. This limits the method's applicability to born-digital PDFs.
- **Legal dataset not released.** Only PubMed and Chn are publicly available; the Legal dataset (the largest at 19K pages) is withheld due to company policy.
- **Limited class diversity.** All datasets share the same 5 coarse classes. The benchmark does not test fine-grained or overlapping label spaces.
- **No comparison with self-training methods.** The related work discusses self-training as an alternative paradigm for cross-domain detection, but no self-training baselines are included in experiments.
- **Single evaluation metric.** Only mAP@0.5 is reported; no mAP@[0.5:0.95] or per-class analysis of failure modes.

## Reproducibility

### Models

- Backbone: ResNet-101 (pre-trained on ImageNet), fine-tuned end-to-end. Total parameter count not reported.
- Detection framework: FPN with RPN (standard Faster R-CNN two-stage pipeline).
- FPA: Four binary domain classifiers, each with three conv layers (kernel size 1, padding 0). ReLU after first two, Sigmoid after last. Classifiers share structure but not weights.
- RA: Three FC layers with ReLU + Dropout after the first two.
- RLA: DeepLab-V2 architecture predicting rendering layer segmentation from $C\_4$ features.
- Initialization strategy for alignment modules not reported.
- No pretrained weights released.

### Algorithms

- Optimizer: SGD, initial learning rate 0.001, divided by 10 every 8 epochs, total 12 epochs. Momentum and weight decay not reported.
- Batch size not reported.
- Loss weights: $\lambda\_1 = \lambda\_2 = 0.1$, $\lambda\_3 = 0.01$.
- Focal loss parameter: $\gamma = 5.0$.
- Image shorter side resized to 600 pixels.
- No mention of warmup, gradient clipping, mixed precision, or other training tricks.
- At inference, FPA/RA/RLA modules are removed; only the standard FPN remains.

### Data

- **PubMed:** 12,871 pages (9,653 train / 3,218 test) from PubLayNet. "List" annotations re-processed to split whole-list boxes into individual items.
- **Chn:** 8,005 pages (5,000 train / 3,005 test) synthesized from Chinese Wikipedia via layout/style randomization.
- **Legal:** 19,355 pages (9,684 train / 9,671 test) of human-annotated legal reports. Not publicly released due to company policy. Inter-annotator agreement not reported.
- PubMed and Chn available via Google Drive (Pascal VOC format) from the [GitHub repo](https://github.com/kailigo/cddod). Legal is withheld. The repo is MIT-licensed, but no explicit dataset license is stated.
- All datasets provide page images, bounding box annotations, raw PDFs, and rendering layers.

### Evaluation

- mAP at IoU 0.5, per-class AP for 5 classes.
- No error bars, significance tests, or multi-run statistics.
- Oracle (supervised target training with FPN) provides an upper bound for each transfer direction.
- SWDA baseline was re-implemented by the authors. Compute budget parity across baselines is not discussed.

### Hardware

- No training hardware, GPU hours, or memory requirements reported.
- No inference latency or throughput measurements.
- Implementation in PyTorch. The ResNet-101 + FPN backbone is a standard architecture that can run on a single consumer GPU at inference.

## BibTeX

```bibtex
@inproceedings{li2020crossdomain,
  title={Cross-Domain Document Object Detection: Benchmark Suite and Method},
  author={Li, Kai and Wigington, Curtis and Tensmeyer, Chris and Zhao, Handong and Barmpalios, Nikolaos and Morariu, Vlad I. and Manjunatha, Varun and Sun, Tong and Fu, Yun},
  booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages={12912--12921},
  year={2020},
  doi={10.1109/CVPR42600.2020.01293}
}
```


